QtCreator provides tooltips for built-in Qt functions, like this:
I've added some documentation to my own function like this:
/**
* @brief serialize Writes the passed field definition set to the specified device.
* @param device Device to write the field definition set to.
* @param fieldDefinitionSet Field definition set to write.
*/
void serialize(QIODevice& device, const FieldDefinitionSet& fieldDefinitionSet) const;
Running Doxygen and qhelpgenerator, I've created my own .qhp file and added it to QtCreator. However, QtCreator still doesn't show my brief summary in the tooltip:
I assume that QtCreator basically has recognized my .qhp file, because hitting F1 shows the generated documentation:
Is there any way of getting the brief summaries in the tooltips as well? I've tried everything in
but still no summary.
The way QtCreator extracts information from HTML documentation files requires a very specific structure for it to work.
For example, the brief summary of MyClass
must be placed between <!-- $$$MyClass-brief -->
and <!-- $$$MyClass -->
marks in the corresponding HTML file. For method summary lookup, more complex marks are used.
Without this, brief extraction is not going to work and no summary will be displayed in QtCreator tooltips.
Sadly this is not well documented and AFAIK it might change in future releases.
If you are really interested you can take a look at QtCreator sources (htmldocextractor.cpp). And I suppose that Qt help files (inside Qt/Docs directory) can be considered working examples.
You can also try : doxygen2qtcreator.
The script inserts those Qt marks in Doxygen-generated HTML files (thus before generating the qch file with qhelpgenerator). It worked for me, but I have not tested it with newer Doxygen/Qt releases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With