QML Documentation Example
This example demonstrates one of the ways to document QML types.
In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the UI Components module.
The generated documentation is available in the UI Components module.
QDoc uses the \brief command to place a basic description when listing the types.
Properties, Signals, Handlers, and Methods
The types have their properties, signals, handlers, and methods defined in their respective QML files. QDoc associates the properties and methods to the types, therefore, you only need to place the documentation above the property, method, or signal.
To document the type of a property alias, you must use the \qmlproperty command to specify the data type.
\qmlproperty int anAliasedProperty An aliased property of type int.
You may declare that a documentation is for internal use by placing the \internal command after the beginning QDoc comment
/*. QDoc will prevent the internal documentation from appearing in the public API.
QML Types with C++ Implementation
This example only demonstrates the documentation for types in QML files, but the regular QML commands may be placed inside C++ classes to define the public API of the QML type.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.