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

Statically built applications that use Qt Quick Controls 2 or Qt Quick Layouts won't run

    XMLWordPrintable

Details

    • 3ef7a9c34782fbc4e17a4d6448ee8ff1daea32ce

    Description

      After applying 8f9fd23575ebaece2019f4e2b7342adfe5b04721 in qtdeclarative and d2b4f02bd03e084c5f8f95d6f38907638bb850fd in qtquickcontrols2, the following error is printed when trying to run the gallery example:

      qrc:/gallery.qml:53:1: static plugin for module "QtQuick.Controls" with name "QtQuickControls2Plugin" cannot be loaded: module "QtQuick.Controls" is not installed
      

      When run with QML_IMPORT_TRACE=1 and QT_DEBUG_PLUGINS=1:

      15:41:45: Starting /media/dev2/qt-dev-static-debug/qtquickcontrols2/examples/quickcontrols2/gallery/gallery ...
      QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
      loaded library "Xcursor"
      QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1" since plugins are disabled in static builds
      QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" since plugins are disabled in static builds
      QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QIconEngineFactoryInterface" since plugins are disabled in static builds
      QQmlImportDatabase::addImportPath: "/media/dev2/qt-dev-static-debug/qtbase/qml"
      QQmlImportDatabase::addImportPath: "qrc:/qt-project.org/imports"
      QQmlImportDatabase::addImportPath: "/media/dev2/qt-dev-static-debug/qtquickcontrols2/examples/quickcontrols2/gallery"
      QQmlImports(qrc:/gallery.qml)::addLibraryImport: "QtQuick" invalid as ""
      QQmlImports(qrc:/gallery.qml)::importExtension: loaded ":/qt-project.org/imports/QtQuick/qmldir"
      QQmlImportDatabase::resolvePlugin: Could not resolve plugin "qtquick2plugin" in ":/qt-project.org/imports/QtQuick"
      QQmlImports(qrc:/gallery.qml)::addLibraryImport: "QtQml" 6.0 as ""
      QQmlImports(qrc:/gallery.qml)::importExtension: loaded "/media/dev2/qt-dev-static-debug/qtbase/qml/QtQml/qmldir"
      QQmlImportDatabase::resolvePlugin: Could not resolve plugin "qmlplugin" in "/media/dev2/qt-dev-static-debug/qtbase/qml/QtQml"
      QQmlImports(qrc:/gallery.qml)::addLibraryImport: "QtQml.Models" 6.0 as ""
      QQmlImports(qrc:/gallery.qml)::importExtension: loaded ":/qt-project.org/imports/QtQml/Models/qmldir"
      QQmlImportDatabase::resolvePlugin: Could not resolve plugin "modelsplugin" in ":/qt-project.org/imports/QtQml/Models"
      QQmlImports(qrc:/gallery.qml)::addLibraryImport: "QtQml.WorkerScript" 6.0 as ""
      QQmlImports(qrc:/gallery.qml)::importExtension: loaded ":/qt-project.org/imports/QtQml/WorkerScript/qmldir"
      QQmlImportDatabase::resolvePlugin: Could not resolve plugin "workerscriptplugin" in ":/qt-project.org/imports/QtQml/WorkerScript"
      QQmlImports(qrc:/gallery.qml)::addLibraryImport: "QtQuick.Layouts" invalid as ""
      QQmlImports(qrc:/gallery.qml)::importExtension: loaded ":/qt-project.org/imports/QtQuick/Layouts/qmldir"
      QQmlImportDatabase::resolvePlugin: Could not resolve plugin "qquicklayoutsplugin" in ":/qt-project.org/imports/QtQuick/Layouts"
      QQmlImports(qrc:/gallery.qml)::addLibraryImport: "QtQuick.Controls" invalid as ""
      QQmlImports(qrc:/gallery.qml)::importExtension: loaded ":/qt-project.org/imports/QtQuick/Controls/qmldir"
      QQmlImportDatabase::resolvePlugin: Could not resolve plugin "qtquickcontrols2plugin" in ":/qt-project.org/imports/QtQuick/Controls"
      QQmlApplicationEngine failed to load component
      qrc:/gallery.qml:53:1: static plugin for module "QtQuick.Controls" with name "QtQuickControls2Plugin" cannot be loaded: module "QtQuick.Controls" is not installed
      QLibraryPrivate::unload succeeded on "Xcursor" (faked)
      15:41:45: /media/dev2/qt-dev-static-debug/qtquickcontrols2/examples/quickcontrols2/gallery/gallery exited with code 255
      

      Same thing happens with Qt Quick Layouts:

      import QtQuick 2.15
      import QtQuick.Layouts 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          RowLayout {}
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes