Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
6.5.3
-
None
Description
When QML Singleton file is not located in root of the project, there is following error when running the application:
qrc:/SingletonTest/qml/main.qml:14: TypeError: Colors was a singleton at compile time, but is not a singleton anymore.
Aliasing all QML files in CMakeFiles.txt (and adopting main.cpp) fixes the issue:
set_source_files_properties(qml/main.qml PROPERTIES QT_RESOURCE_ALIAS main.qml)
set_source_files_properties(qml/Colors.qml PROPERTIES QT_RESOURCE_ALIAS Colors.qml)
But these aliases must be created for all files in the module.
Minimal example is attached.