Documentation for Qt documentation comments? Qt + Doxygen? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this questionWhere can I find documentation for Qt documentation comments? I'm referring to how Qt uses a specific style for documentation comments, like so:
/*!
\class MyClassName
\brief The MyClassName class is used as an example on Stack Overflow.
This class serves a few functions, the most important being:
\list
\i So people can understand my question.
\i So people can have a few laughs at the comedy in my example.
\endlist
*/
...you get the picture. So where can I find information about all the switches, like \class, \list, \brief, etc. Also, what tool(s) do I use to generate documentation files from t开发者_如何学Pythonhese comments in my source files? Does Doxygen support this syntax?
Don't use qdoc. It is deprecated. Use Doxygen, which is based on qdoc anyway.
That said, the documentation (in qdoc format :-D ) is here.
There are two parts of doxygen that are qt-specific: the Qt Comment Style and the QT_AUTOBRIEF Doxyfile configuration tag. These are simply parts of doxygen that are used by QT. All doxygen comments used by QT are regular doxygen stuff. So you just need to read up on doxygen.
Or perhaps are you really looking for documentation of QT internals, such as information on d-Pointers as contained in this blog entry
Qt Style Comments:
The /*! text */
comment style is called the "Qt Style" of doxygen comments. The !
marks the entire comment block as a doxygen comment block. It is a standard, optional part of doxygen.
QT_AUTOBRIEF setting: if the "QT_AUTOBRIEF" tag is set to TRUE in the Doxyfile, the first line of a Qt style comment block is automatically interpreted as the \brief description.
From the doygen GUI help:
QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first line (until the first dot) of a Qt-style comment as the brief description. If set to NO, the comments will behave just like regular Qt-style comments (thus requiring an explicit \brief command for a brief description.)
Use doxygen to create documentation
It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (LaTeX) from a set of documented source files. There is also support for generating output in RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code.
You can configure doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. You can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically.
http://www.doxygen.nl/
You can take a look at the Qt source code itself for the Qt documentation comments...
Qt - SRC - 4.6.3
I have used DOxygen for documentation and for me it's working fine, though the documentation standards are not of Qt. I suggest you to give it a try though and decide.
精彩评论