diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/qml/doc/snippets/cmake/qt_target_qml_sources/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/qml/doc/src/cmake/qt_target_qml_sources.qdoc | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/doc/snippets/cmake/qt_target_qml_sources/CMakeLists.txt b/src/qml/doc/snippets/cmake/qt_target_qml_sources/CMakeLists.txt index 7ec50e425f..bc6eb04bb7 100644 --- a/src/qml/doc/snippets/cmake/qt_target_qml_sources/CMakeLists.txt +++ b/src/qml/doc/snippets/cmake/qt_target_qml_sources/CMakeLists.txt @@ -24,6 +24,7 @@ qt_add_qml_module(qt_target_qml_sources_example URI Example VERSION 2.3 RESOURCE_PREFIX /my.company.com/imports + NO_GENERATE_EXTRA_QMLDIRS QML_FILES nested/way/down/File.qml TemplateFile.qml diff --git a/src/qml/doc/src/cmake/qt_target_qml_sources.qdoc b/src/qml/doc/src/cmake/qt_target_qml_sources.qdoc index 3911b18c08..e472d57373 100644 --- a/src/qml/doc/src/cmake/qt_target_qml_sources.qdoc +++ b/src/qml/doc/src/cmake/qt_target_qml_sources.qdoc @@ -177,6 +177,11 @@ relative to the \c{target}'s \c SOURCE_DIR target property. This relative path can be overridden by setting the \c QT_RESOURCE_ALIAS property on the source file. This is commonly used to collect files from different directories and have them appear in the resources under a common location. +However, since Qt 6.8, enabling \l{QTP0004} is often a better option if the goal +is that all files of the QML module can be found in the implicit import. +In cases where such a manual setup is still necessary, it is advisable to pass +\c {NO_GENERATE_EXTRA_QMLDIRS} to \c{qt_add_qml_module}, as the extra qmldirs do +not take resource file aliasing into consideration. \target qt_target_qml_sources_example \snippet cmake/qt_target_qml_sources/CMakeLists.txt 0 |
