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

QQmlApplicationEngine::addImportPath broken since Qt 5.12.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • 5.12.5
    • 5.12.2, 5.12.4, 5.13.0
    • None
    • iPad Pro; Model: ML0N2FD/A; iOS 11.4
      iPad Air 2; Model: MGKL2FD/A; iOS 12.3.1
    • iOS/tvOS/watchOS

    Description

      When adding a custom import path for QML modules, QtQuick.Control 1 cannot be loaded anymore on iOS static build.

      Error message:

      QQmlApplicationEngine failed to load component

      qrc:/main.qml:58 Type ApplicationWindow unavailable

      file::/qt-project.org/imports/QtQuick/Controls/qmldir:-1 module ":.qt-project.imports.QtQuick.Controls" plugin "qtquickcontrolsplugin" not found

       

      This can be reproduced with the example "Qt Quick Controls 1 - Gallery".

      Change

      QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
      

      to

      QQmlApplicationEngine engine;
      engine.addImportPath("qrc:/");
      engine.load(QUrl("qrc:/main.qml"));
      

       

      Attachments

        Issue Links

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

          Activity

            People

              andysh Andy Shaw
              simmay Simon Mayer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes