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

Code model: errors on 'Component' & 'QtObject'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • Qt Creator 8.0.2, Qt Creator 9.0.0, Qt Creator 9.0.1
    • Quick / QML Support
    • Mac (M1 Apple Silicon), macOS 12.6, Apple clang version 13.1.6 (clang-1316.0.21.2.5), Qt Creator 9.0.0
    • macOS

    Description

      The following QML shows up with lint errors in Qt Creator:

      • instance of `Component` gets M300 Unknown component error
      • instance of `QtObject` gets M300 Unknown component error
      • property `Component` gets M16 Invalid property name

       

      In Qt 6.3.2, everything looks and works fine even if:

      • CMake find_package omits Qml but includes Quick
      • CMake target_link_libraries omits Qt6::Qml but includes Qt6::Quick
      • QML file omits `import QtQml` but includes `import QtQuick`

      In Qt 6.4.1, omitting or including the above, works fine but displays the lint errors.

       

      Minimal project attached, along with a screenshot.

      Attachments

        1. Screenshot 2022-12-05 at 18.52.52.png
          Screenshot 2022-12-05 at 18.52.52.png
          59 kB
        2. main.qml
          0.4 kB
        3. CMakeLists.txt
          0.8 kB

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              paulmasri Paul
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes