Unsolved how to add qml files of an upper directory to qrc (../src/qmlfiles) ?
-
Hey guys,
I have a directory-structure like this:
MyProject ├─ MyProject.pro ├─ defaults.pri ├─ apps/ │ ├─ apps.pro │ ├─ app1/ │ └─ app2/ │ ├─ app2.pro │ └─ main.cpp ├─ src/ │ ├─ class1.cpp │ ├─ class2.cpp │ └─ qmlfiles/ │ ├─ Button1.qml │ └─ Button2.qml └─ tests/ ├─ tests.pro └─ main.cpp
Lets say I'm in app.pro:
When I add button1.qml to qml.qrc it will look like this:../../src/qmlfiles/Button1.qml
Now I want to add this button to main.qml, so I import it like this:
import "../../src/qmlfiles/"
No problems so far. Qt Designer even shows the button as expected.
As soon as I start my application it saysQQmlApplicationEngine failed to load component qrc:/main.qml:4 "../../src/qmlfiles/": no such directory
Any idea how I can solve this problem?
CU
mts