Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84480

Enable androiddeployqt to deploy QML-only plugins

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • 5.15
    • 5.11, 5.15
    • None
    • Android

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rampe Rami Potinkara
              assam Assam Boudjelthia
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes