[Qt-qml] How plugin paths should work

henrik.hartz at nokia.com henrik.hartz at nokia.com
Fri Aug 6 09:32:39 CEST 2010


Hi Jyrki,

While not having a solution to your problem without the full source available, you might find that using QML_IMPORT_TRACE environment variable to see what's happening with your module plugins;

http://doc.qt.nokia.com/4.7-snapshot/qdeclarativedebugging.html

Hope this helps!
Henrik

On 6. aug. 2010, at 09.14, ext Jyrki Hämäläinen wrote:

> 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
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml





More information about the Qt-qml mailing list