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

Qt Creator does not reparse QML following change to CMake (or even rebuild)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 6.0.1, Qt Creator 6.0.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      MacBook Pro (M1, macOS 12.1)
    • Platform/s:
      macOS

      Description

      When changes are made in CMakeLists.txt, for example adding or removing class sources from a qt_add_qml_module, the Projects window updates but QML files do not.

      Closing and opening the QML file doesn't cause it to re-parse.

      Nor does deleting the build folder and rebuilding.

      The only way to get the QML file to parse correctly is to quit Qt Creator and start it again.

      See attached showing main.qml after Age.h & Age.cpp have been added and Person.h & Person.cpp have been commented out from CMakeLists.txt as follows:

      qt_add_qml_module(People
          URI People
          VERSION 1.0
          SOURCES
          Age.h Age.cpp
      #    Person.h Person.cpp
      )
      

      The first image shows the change reflected in Projects pane but not in main.qml despite the above attempts to cause a reparse.

      The second image shows the change correctly reflected, following Qt Creator being quit and restarted.

        Attachments

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

          Activity

            People

            Assignee:
            fawzi Fawzi Mohamed
            Reporter:
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes