[Qt-qml] How plugin paths should work
Jyrki Hämäläinen
jyrki.hamalainen at nomovok.com
Fri Aug 6 09:14:44 CEST 2010
Hello everyone,
We are trying to build a suite of applications with QML.
Some of the applications need to share C++-plugins.
Also to enhance the structure of the application, some applications use
subfolders to group related qml-files into modules.
The application structure would be like this
/xxx/qmlapp/main.qml --> plugin_a, module1/mod1_a.qml, module1/mod1_b.qml
/xxx/qmlapp/qmldir
/xxx/qmlapp/module1/mod1_a.qml --> plugin_a
/xxx/qmlapp/module1/mod1_b.qml
/xxx/qmlapp/module1/qmldir
/yyy/libs/libplugin_a.so
Where
main.qml uses 'import "module1"', to import qml files in subfolder module1.
main.qml ja qml-module located in the subfolder use the shared plugin.
Also qmldir files have content as follows
/xxx/qmlapp/qmldir:
plugin plugin_a
/xxx/qmlapp/module1/qmldir
plugin plugin_a
Mod1_A mod1_a.qml
Mod1_B mod1_b.qml
We are trying to run the application like this
qmlviewer -P /yyy/libs/ /xxx/qmlapp/main.qml
The problem is that for some reason the plugin (or the types registered
by the plugin) cannot be found when parsing the qml-file located in the
subfolder.
If all QML files (that are using the plugin - I suppose) are located in
the same folder. Everything seems to run smoothly.
I was wondering if someone has bumped into same or similar problem and
perhaps even found a solution / workaround.
This seems like a trivial use case to me and its hard to imagine this
would be a problem on QML framework side.
Just cannot locate the problem on our side setup either.
I really would appreciate any pointers on this issue.
Best Regards,
--
Jyrki Hämäläinen
More information about the Qt-qml
mailing list