Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-30191

It gives an error for codes that are not included

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 12.0.1
    • Quick / QML Support
    • None
    • Android, Linux/Wayland

    Description

      Hi,

      I'm using Qt 6.5.3 and 5.15.2. I am using 6.5.3 arm64_v8 for Android and 5.15.2 Desktop kits for Ubuntu. There are different QML codes for Desktop and Android in a project.

      I include qml files in the .pro file as follows: 

      android:arm64-v8a:RESOURCES += android_qml.qrc
      
      unix:!android:RESOURCES += ubuntu_qml.qrc

       

      When I switch between Android and Desktop kits, unused codes are grayed out in the project tree section. In the Android kit, the codes for the Desktop are greyed out. The codes for Android in the Desktop kit are greyed out. Everything is good looks like.

      In QML files for Qt 6.5.3 I do not write a version number after "import...". For example:

      import QtQuick

       

      When I write for 5.15.2, I write like this: 

      import QtQuick 2.15

       

      Even if the codes are not used and are grayed out, when I select the 5.15.2 kit, I get errors like this in the "Issues" section:

      "Main.qml:4: error: package import requires a version number"

      The error it gives is related to the Android Qml file. And when this error appears, QML files for Android appear gray.  While i selected 5.15.2 Desktop kit, even though there are errors, it compiles successfully. I can run the program.

      Its looks weird and I think thats a problem. Should be fixed.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            osos11 Alperen UNAL
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes