7

QtCreator provides tooltips for built-in Qt functions, like this:

enter image description here

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:

enter image description here

I assume that QtCreator basically has recognized my .qhp file, because hitting F1 shows the generated documentation:

enter image description here

Is there any way of getting the brief summaries in the tooltips as well? I've tried everything in

but still no summary.

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.