views:

111

answers:

4

Where 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 these comments in my source files? Does Doxygen support this syntax?

A: 

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.

liaK
+4  A: 

Don't use qdoc. It is depreciated. Use Doxygen, which is based on qdoc anyway.

That said, the documentation (in qdoc format :-D ) is here.

scomar
I was looking for http://qt.gitorious.org/qt/pages/DocManual and http://qt.gitorious.org/qt/pages/DocMarkupCommands. Without knowing what it was called (qdoc, eh?) I couldn't Google it. A lot of the links seem to be dead though
Jake Petroules
Now, are you saying the qdoc *tool* is deprecated, or the entire qdoc *syntax* (including the tool) is deprecated? Nokia uses the qdoc syntax exclusively in Qt, is that just for backwards compatibility or should a different style (like Javadoc comments) be used instead? Obviously it's up to a programmer but I want to remain consistent with the rest of Qt or whatever Nokia recommends.
Jake Petroules
+1  A: 

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.stack.nl/~dimitri/doxygen/

Pardeep
A: 

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 doxgyen 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.)

sschilz