Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
5.11, 5.15
-
None
Description
When working with Qt projects that use QML plugins, you need to know to use QML_ROOT_PATH to point to the correct main QML file and from there all imports are scanned and added as dependencies. All the dependencies which are picked up there are C++ QML plugins, but only if you also set QML_IMPORT_PATH accordingly.
In a normal project, you might also have QML-only plugins in the import folder which QML_IMPORT_PATH is pointing to. androiddeployqt is only deploying C++ QML plugins, so you need to deploy all QML only plugins by yourself. As you don't want to write an install rule for every single QML file in your project (and because there is no wildcard, then no qrc file, because it means more maintenance for the QML developers) you end up in splitting up the "imports" folder into one for C++ plugins which are deployed by androiddeployqt and one for QML only ones which can simply be copied over. If you don't do that and copy parts from the C++ QML plugins (e.g. qmldir) into the assets folder, funky things start to happen. Such as all of a sudden a nested QML import will try to import the second copy (the one in the asset folder) of your QML plugin and that will fail.
Attachments
Issue Links
- is required for
-
QTBUG-72141 Qt for Android integration cannot be used for complex QML apps
- Closed
- relates to
-
QTBUG-84482 QML_ROOT_PATH and QML_IMPORT_PATH are not documented well
- Closed