Details
-
Suggestion
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
None
Description
If a custom RESOURCE_PREFIX is used for qt_add_qml_module(), then a corresponding call to QQmlEngine::addImportPath() is required in C++.
Would it be feasible to have CMake generate code to automatically add such custom prefixes to a list of (global) import paths? One possible approach could be:
- Add a static method, QQmlEngine::addGlobalImportPath(), that can be used to add custom import paths to all engines in a process.
- Add a CMake option to auto-generate code that calls this function, possibly just before initializing the plugin/resources.