QTP0001

':/qt/qml/' is the default resource prefix for QML modules.

This policy was introduced in Qt 6.5. It changes where qt_add_qml_module() stores QML resources in the resource system.

Enabling this policy ensures that your QML module is placed under a default import path, and its types can be found without manual calls to QQmlEngine::addImportPath.

The OLD behavior of this policy is that, the RESOURCE_PREFIX argument for qt_add_qml_module() defaults to ":/".

The NEW behavior of this policy is that the RESOURCE_PREFIX argument for qt_add_qml_module() defaults to ":/qt/qml/". The new behavior ensures that modules are put into the QML Import Path and can be found without further setup.

Qt 6.5 issues warnings if you do not pass any of the following arguments to the qt_add_qml_module command: RESOURCE_PREFIX, NO_RESOURCE_TARGET_PATH. Use the qt_policy command to suppress the warning by explicitly setting the policy to OLD or NEW.

Note: The OLD behavior of a policy is deprecated, and may be removed in the future.

See also qt_policy, qt_standard_project_setup(), qt_cmake_policies, and qt_add_qml_module.

© 2024 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.