[Qt-qml] QML Viewer, plugins and shadow builds.

Simon Aridis-Lang llamatronique at gmail.com
Mon Oct 18 10:09:44 CEST 2010


Hi,

I'm having some problems with using shadow builds and declarative plugins.  Taking the example from ch6, i've set a shadow build in ../chapter6-plugins-build-desktop relative to the project.

With the following layout, running app.qml works fine in the viewer.

chapter6-plugins/app.qml
chapter6-plugins/qmldir
chapter6-plugins/lib/libchapter6-plugins.dylib

however with the following layout:

chapter6-plugins/app.qml
chapter6-plugins-build-desktop/qmldir
chapter6-plugins-build-desktop/lib/libchapter6-plugins.dylib

and the following command line:

QML_IMPORT_TRACE=1 /Developer/Tools/Qt/QMLViewer.app/Contents/MacOS/QMLViewer -P ../chapter6-plugins-build-desktop app.qml

... it fails to load the module.

QDeclarativeImportDatabase::addImportPath "/Developer/Applications/Qt/imports" 
QDeclarativeImportDatabase::addImportPath "/Developer/Applications/Qt/QMLViewer.app/Contents/MacOS" 
QDeclarativeImportDatabase::addImportPath "../chapter6-plugins-build-desktop" 
QDeclarativeImportDatabase::addToImport 0x10234c8b0 "." -1.-1 File as ""
QDeclarativeImportDatabase::add: loaded "/Developer/Examples/Qt/declarative/tutorials/extending/chapter6-plugins/qmldir" 
QDeclarativeImportDatabase::resolvePlugin: Could not resolve plugin "chapter6-plugins" in "/Developer/Examples/Qt/declarative/tutorials/extending/chapter6-plugins" 
QDeclarativeImportDatabase::addToImport 0x10234c8b0 "Qt" 4.7 Library as ""
QDeclarativeImportDatabase::resolveType "Item" = "QDeclarativeItem" 
file:///Developer/Examples/Qt/declarative/tutorials/extending/chapter6-plugins/app.qml:45:5: PieChart is not a type 
         PieChart { 
         ^ 

Is this the correct usage of the -P option, or have I missed something?

Regards,
Simon.






More information about the Qt-qml mailing list