Module location transparency, flawed ?
-
wrote on 16 Mar 2011, 18:33 last edited by
I've got the following files hierarchy somewhere:
@
mysdk/
---mywidgets/
---widget1.qml
---widget2.qml
---qmldir
---tools/
---myLoader.qml
---qmldir
@and in myLoader.qml, i've got the following code
@
import Qt 4.7Item {
...
property alias loadComponent: loader.sourceComponent
Loader {
id: loader
}
}
@I set the QT_MPORT_PATH and when I try something like this:
@
import Qt 4.7
import mysdk.mywidgets 1.0
import mysdk.tools 1.0item {
MyLoader {
loadComponent: Widget1
}
}
@It does not work! the Widget1 is not resolved. The only solution is to use a "../widget1.qml" kind of url and that's exactly what i do not want.
Is there a way to do this or is this limitation is wanted/known/featured ?--
-
wrote on 17 Mar 2011, 16:10 last edited by
bump?
i tried:
@
import Qt 4.7
import mysdk.mywidgets 1.0 as MyW
import mysdk.tools 1.0item {
MyLoader {
loadComponent: MyW.Widget1
}
}
@but it's the same problem :/
-
wrote on 17 Mar 2011, 18:40 last edited by
Try uppercase for the first letter of your component. QML is case sensitive, even wrt. filenames used.
1/3