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

Proper way to deploy 3rdparty Qt Quick plugins

    XMLWordPrintable

Details

    • macOS
    • 24189b5f0935914a979b7e9d3786bec8f9f019bc (qt/qttools/dev)

    Description

      I am currently using Qt to develop a cross-platform application which uses a 3rdparty Qt Quick library, Kirigami.

      To build a distributable image, dmg, I use macdeployqt. I want Kirigami to be included into the image, but macdeployqt only adds Qt's own QML modules. According to the macdeployqt manual:
      -qmldir=<path> : Scan for QML imports in the given path.
      This argument is used to specify the application's qml source directory to be scanned for import * statements. It can accept multiple paths, but these are not used as library search paths.

      To specify a library search path, macdeployqt would need to pass it as an -importPath argument to qmlimportscanner, but it only passes Qt's default library location: http://code.qt.io/cgit/qt/qttools.git/tree/src/macdeployqt/shared/shared.cpp#n1236

      As a hack one can create a link to the custom location from inside the Qt installation, and that's what I use for now, but I believe there has to be a better way.

      I faced the same issue with linuxdeployqt and authored a patch that allows to provide a list of QML module locations to linuxdeployqt. The discussion and detailed explanation ia available here.

      Linuxdeployqt is heavily based on macdeployqt, so I thought I can fix the same issue upstream to avoid hacks on macOS as well.

      Attachments

        For Gerrit Dashboard: QTBUG-70977
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            ilya_b Ilya Bizyaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes