Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt Creator 11.0.3, Qt Creator 12.0.0-beta2, Qt Creator 13.0.0-rc1
-
None
-
-
1d0246a89 (master), a59c93d20 (13.0)
Description
I am working on a Qt6.5 QML application. We would like to use the qml_add_qml_module to add QML modules in subdirectories. We followed the directions available at https://doc.qt.io/qt-6/qtqml-writing-a-module.html to create a module, but when we tried to import the module, Qt Creator told us the module wasn't found. (It also greyed out components from that module on the editor.). However, when we run the project, the module is imported and the application runs fine.
I tried clean, rebuild, deleting the build directory and building again. Deleting the CMakeLists.txt.user file and reloading and configuring the project as well. In each case, the app runs correctly, but the editor still complains it can't find the QML module and the component from the module is grayed out.
The only way I could get the editor to not show the error is if I reconfigured the project from fresh in a different directory location. Then there is no error on the import of the module, and the components imported show up green in the editor.
I have attached a sample project that I was using to test this. Note, since loading it fresh, you will probably see that MyModule and AnotherModule are loaded properly. The problem arises when I add another module (created a subdirectory with module definition and added it via the directions from Qt documentation)
Is there a way to add a new module that would avoid this problem in the editor?
Attachments
Issue Links
- depends on
-
QTBUG-118705 qmlls: automatic qmltypes generation
- Open
-
QTBUG-120000 Support semantic highlighting in QML language server
- In Progress
- is required for
-
QTCREATORBUG-29407 Make QtCreator ready for latest qmlls features
- Closed
- resulted in
-
QTBUG-123729 doc: add links to Qt Creator Manual for "Writing QML Modules" note about resetting the code model
- Closed
For Gerrit Dashboard: QTCREATORBUG-29826 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
548856,5 | qmljshoverhandler: do not show tooltips when qmlls is enabled | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
550105,2 | qmljslink: implicit imports from build dir types | master | qt-creator/qt-creator | Status: DEFERRED | -1 | 0 |
550467,2 | doc: add note about Qt Creator possibly requiring a Code Model Reset | dev | qt/qtdeclarative | Status: ABANDONED | +1 | 0 |
551150,4 | Doc: Update info about resetting the QML code model | 13.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |