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:
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.