In QtCreator, when pressing “F1” while editing your code you can get help on the selected word.
Natively, this is working well for Qt classes, but not for std::vector nor itk::Image and so on…
In fact it is possible to add dedicated help file to QtCreator: see here.
The way to add a new help file (say .qch file) in Qt Creator is every time the same:
- Get the desired qch file
- in QtCreator go in Tools –> options –> Help. The documentation tab and clic “add”, then select your .qch file.
- restart QtCreator
On the previous link you can found many ressources about classical libraries. Here is my own selection (the qch file are linked):
In order to generate new qch files, Doxygen is able to produce QHP files. Then there is a tool from Qt that produces the QCH file from QHP. If well configured, doxygen can produce a .qch file. remind to set properly these flags:
- GENERATE_QHP = YES (produce QHP file)
- QCH_FILE = TheFile.qch (as said in the help file : you have to specify QHG_LOCATIION)
- QHP_NAMESPACE = The.Lib.name
- QHG_LOCATION = /bin/qhelpgenerator (or qhelpgenerator … the tool to go from qhp to qch)
As example for ITK, CMake allow us to build documentation using doxygen and produces the doxygen.config file:
- set the flag “BUILD_DOCUMENTATION” to ON (in the advanced mode), then configure.
- then, set also to ON the flag “ITK_DOXYGEN_QHP”.
- configure and generate,
- then “make -j8” (and remind that the documentation generation tools is very very long).
These steps should produce an “index.qhp” file (close to “./Utilities/Doxygen/html/index.qhp” in your building directory) as ITK don’t complete properly QHP_NAMESPACE and QHG_LOCATION (but you can edit the doxygen.config.in before all…). So, in order to convert your QHP file into a qch file, execute qhelpgenerator manually: qhelpgenerator index.qhp -o ~/ITK.qch
Done!