diff options
Diffstat (limited to 'src/qml/doc/src/cmake/qt_add_qml_module.qdoc')
-rw-r--r-- | src/qml/doc/src/cmake/qt_add_qml_module.qdoc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc index 05ca519437..44849d8153 100644 --- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc +++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc @@ -75,6 +75,9 @@ qt_add_qml_module( \versionlessCMakeCommandsNote qt6_add_qml_module() +See \l {Building a QML application} and \l {Building a reusable QML module} +for examples that define QML modules. + \section1 Description This command defines a QML module that can consist of C++ sources, \c{.qml} @@ -128,6 +131,10 @@ For cases where the QML module needs a custom plugin class implementation, the \l{NO_GENERATE_PLUGIN_SOURCE} and usually the \l{NO_PLUGIN_OPTIONAL} options will be needed. +\note +When using static linking, it migt be necessary to use +\c Q_IMPORT_QML_PLUGIN to ensure that the QML plugin is correctly linked. + \section3 Plugin target with no backing target A QML module can be defined with the plugin target serving as its own backing @@ -283,6 +290,17 @@ target will be the \c target followed by \c{_qmllint}. An \c{all_qmllint} target which depends on all the individual \c{*_qmllint} targets is also provided as a convenience. +\target qml-naming-js-files +\section2 Naming conventions for \c{.js} files + +JavaScript file names that are intended to be addressed as components should +start with an uppercase letter. + +Alternatively, you may use lowercase file names and set the source file +property +\l{cmake-source-file-property-QT_QML_SOURCE_TYPENAME}{QT_QML_SOURCE_TYPE_NAME} +to the desired type name. + \target qml-cmake-singletons \section2 Singletons |