W3cubDocs

/Qt 5.11

Grouping Things

The grouping commands relate classes to defined groups and modules. The groups are used when generating lists of related classes in the documentation, while the modules are elements of Qt's structure.

Commands

\ingroup

The \ingroup command indicates that the given overview or documented class belongs to a certain group of related docmentation.

A class or overview may belong to many groups.

The \ingroup command's argument is a group name, but note that the command considers the rest of the line as part of its argument. Make sure that the group name is followed by a linebreak.

/ *!
    \class QDir
    \brief The QDir class provides access to directory
           structures and their contents.

    \ingroup io
    ...
* /

This will include the QDir class in the io group, which means, for example, that QDir will appear on the list created by calling the \group command with the io argument.

To list overviews that are related to a certain group, you must generate the list explicitly using the \generatelist command with the related argument.

See also \group.

\inmodule

The \inmodule command relates a class to the module specified by the command's argument.

For the basic classes in Qt, a class's module is determined by its location, namely its directory. However, for extensions like ActiveQt and Qt Designer, a class must be related to a module explicitly.

The command's argument is a module name, but note that the command considers the rest of the line as part of its argument. Make sure that the module name is followed by a linebreak.

/*!
    \class QDesignerTaskMenuExtension
    \inmodule QtDesigner
* /

This ensures that the QDesignerTaskMenuExtension class is included in the Qt Designer module, which means, for example, that the class will appear on the list created by calling the \generatelist command with the {classesbymodule QtDesigner} argument.

See also \module and \generatelist.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5/19-qdoc-commands-grouping.html