Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
Qt Creator 3.6.1, Qt Creator 4.0.0
-
None
Description
QML Designer seems to have problems importing QML modules from a project to another project, even if the QML_IMPORT_PATH is setup.
I attached an example of project. I have a SUBDIRS with two .pro, a library and a app.
The projects compile and works (in main.cpp the correct folder is added to the import path), but when I try to open MainForm.ui.qml with QML Designer, a lot of problems arise.
The line...
import Library 1.0
is underlined in red and QML Designer explodes. The error message is puzzling because it clearly said that the correct path is in QML import path, but the module is still not found.
If I substitute the line with:
import "../Library" 1.0
everything seems fine but... the components of the library ARE NOT displayed in the QML Types tab, and so are not available in the Designer to be drag&dropped.
If I move the QML_IMPORT_PATH settings from the app.pro to the main .pro, something strange happens.
QtCreator 3.6 starts to open the MainForm.ui.qml properly (but components are still missing from the drag&drop tab), but QtCreator 4.0.0 still fails.
I think the expected behavior is:
import Library 1.0
this should work in any case, if the QML_IMPORT_PATH is properly setup and that all the components available should be correctly displayed in the QML Types tab inside QML Designer.
Attachments
For Gerrit Dashboard: QTCREATORBUG-16425 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
163343,3 | QmlJs: fixes bug in module import search. | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |