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

Scanning for QML imports of projects fails

XMLWordPrintable

    • Android, iOS/tvOS/watchOS
    • 12486c4b0 (dev), dc7e4e0d1 (6.7), 87a36db9e (tqtc/lts-6.5)
    • 2023wk52FOQtforAndroid, 2024wk04FOQtforAndroid, 2024wk06FOQtforAndroid, 2024wk08FOQtforAndroid, 2024wk10FOQtforAndroid, 2024wk12FOQtforAndroid, 2024wk14FOQtforAndroid

      The parsing for nedded QML imports fails, if there is a project structure like this:

      • Subdir project
        • application project
        • library project

      The library project is e.g. a GUI lib, the application project link against this lib and is the executable. Only the GUI lib constains QML files (see attached example)

      When the application runs there comes following error:

      W/Qt ( 3763): qrc:/main.qml:1 ((null)): qrc:/main.qml:1:1: module "QtQuick" is not installed

      This is new in 5.4.0, in 5.3.2 the QML of the GUI library is still parsed and there are no errors. The changes in qmlimportscanner / androiddeployqt made for 5.4.0 have broken this.

      There is workround: put an DummyImports.qml inside the application project. The DummyImports.qml has to contain all the needed import statements.

        1. ImportQMLBug.zip
          3 kB
          Siebenhandl
        2. ImportQMLBugFoldHierarchyChanged.zip
          4 kB
          Tapio Oksa
        3. cmakeReproducer.zip
          6 kB
          Sami Shalayel
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ulherman Ulf Hermann
            work7 Siebenhandl
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            10 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes