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.

命令

\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 类在 io group, which means, for example, that QDir will appear on the list created by calling the \group command with the io 自变量。

To list overviews that are related to a certain group, you must generate the list explicitly using the \generatelist command with the related 自变量。

另请参阅 \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} 自变量。

另请参阅 \module and \generatelist .