Create a plugins
-
ok - you right , i changed it to :
@plugin NGWidgets C:/Qt/Projects/NGWidgets-build-desktop/lib@
but still have the same problem -
Have you already tried tracing the module import?
-
this is the output:
QDeclarativeImportDatabase::addImportPath: "C:\QtSDK\Desktop\Qt\4.7.3\mingw\imports"
QDeclarativeImportDatabase::addImportPath: "C:/Qt/Projects/App-build-desktop/debug"
QDeclarativeImports(C:/Qt/Projects/App/app.qml)::addImport: "." -1.-1 File as ""
QDeclarativeImports(C:/Qt/Projects/App/app.qml)::addImport: "QtQuick" 1.0 Library as ""
QDeclarativeImports(C:/Qt/Projects/App/app.qml)::addImport: "NGWidgets" 1.0 Library as ""
C:/Qt/Projects/App/app.qml:3:1: module "NGWidgets" is not installed -
is this a good output?
-
Did you place your qmldir file "correctly":http://doc.trolltech.com/4.8-snapshot/qdeclarativemodules.html#installed-modules?
-
yes, this is in the main directory of the App project...
-
the dll islocate in the "C:\Qt\Projects\NGWidgets-build-desktop\lib"
and the qmldir file is in "C:\Qt\Projects\App" -
can someone post please code of 2 project (one plugin, and one qml application that use the plugin) , when the projects are not under the same build , and it work for him please.
-
Yup only takes 10 minutes! You can find the projects at:
"Project 1 (the QML plugin)":http://www.theharmers.co.uk/busyindicator.tar.gz
"Project 2 (the app using the plugin)":http://www.theharmers.co.uk/simpleqmlapp.tar.gzYou will need to alter the following things to make it work on your system:
In busyindicator.pro edit the line
@
target.path = $$(HOME)/local/lib
@
to a path of your choice.In the 2nd project edit the file simpleqmlapp/qml/simpleqmlapp/qmldir so that the path matches what you set in the .pro file above. By default it contains:
@
plugin zapbsqmlplugin /home/sean_harmer/local/lib
@With the above mods in place, just do:
@
qmake
make
make install
@in the busyindicator project. Followed by:
@
qmake
make
@in the simpleqmlapp project.
-
thank you for all your help. i will check this example :)