diff options
Diffstat (limited to 'src/qml/doc/src/qmlfunctions.qdoc')
-rw-r--r-- | src/qml/doc/src/qmlfunctions.qdoc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc index f6660cddce..52bf1f3f4a 100644 --- a/src/qml/doc/src/qmlfunctions.qdoc +++ b/src/qml/doc/src/qmlfunctions.qdoc @@ -45,8 +45,8 @@ \endcode You can use the build system to register the type in the type namespace - \e {com.mycompany.qmlcomponents} with major version \c 1 by specifying the - following in your project file: + \e {com.mycompany.qmlcomponents} with major version \c 1. + For qmake, specify the following in your project file: \badcode CONFIG += qmltypes @@ -54,6 +54,15 @@ QML_IMPORT_MAJOR_VERSION = 1 \endcode + With CMake, you pass the URI and version to qt_add_qml_module + + \badcode + qt6_add_qml_module(myapp + URI com.mycompany.qmlcomponents + VERSION 1.0 + ) + \endcode + Once registered, the type can be used in QML by importing the same type namespace and version number: |