Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 13.0.2, Qt Creator 15.0.0
-
Ubuntu
Qt Creator 12.* 13.*
Description
I try Local Directory Imports into a qualified local namespace but without success, but if I import by qrc the application builds and runs like expected but in Qt Creator the auto-completation doesn't work, and the Components imported into a qualified fails, not recognized at all the Qt creator show the error "M300 Unknown Component".
I found some related Qt Creator issues reported in pass:
QTCREATORBUG-22392
QTCREATORBUG-22839
QTCREATORBUG-19637
I think the problem is when import not in app directory
├── appX | ├── mycomponents.qrc | └── main.qml | ├── appY | ├── mycomponents.qrc | └── main.qml | └── shared └── mycomponents ├── Component1.qml └── Component2.qml
mycomponents.qrc
<RCC> <qresource prefix="/MyComponents"> <file alias="Component1.qml">../shared/mycomponents/Component1.qml</file> <file alias="Component2.qml">../shared/mycomponents/Component2.qml</file> </qresource> </RCC>
when I try import in appX/main.qml
import "qrc:/MyComponents" as MyComponents MyComponents.Component1 { // ... }
this way works build and run but in Qt Creator not recognized show the error "M300 Unknown Component"