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

QML Editor: imports not properly recognized until file is saved (M300)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • Qt Creator 6.0.2
    • Quick / QML Support
    • None

    Description

      Hello,

      With latest QtCreator, it seems that from time to time, completion fails to recognize some of the imports, until I change something and save to re-trigger the completion.

      I attached an example, where for example GameWindow.qml is located into ./Gui/Widgets folder, which is imported. Funny thing is that GameScene.qml is located on the same folder (./Gui/Widgets) but is recognized.

      Not sure what is the source cause.

      One comment worth noting is that my qmake project has a root .pro file with:

      CONFIG += ordered
      TEMPLATE = subdirs
      SUBDIRS += ImagePlugin MyApp
      

      Then MyApp/MyApp.pro is very standard:

      TEMPLATE = app
      
      QT += qml quick
      CONFIG += c++17
      CONFIG += qtquickcompiler
      
      SOURCES += [...]
      HEADERS += [...]
      
      RESOURCES += qml.qrc
      

      QML files are stored into the qml.qrc file.

      Might be similar than https://bugreports.qt.io/browse/QTCREATORBUG-26987 but for QML editor (though the bug mentioned in this ticket happened after I manually relaunched qmake, and I opened the QML file after everything was properly rescanned).

      Qt version used in the project is Qt 5.14.1.

      Thank you,
      Best regards,
      Louis

      Attachments

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

        Activity

          People

            fawzi Fawzi Mohamed
            amnell Louis du Verdier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes