[SOLVED] QML Extension plugin
-
Hello, today i have installed qt 4.7.0 for mingw and tried to launch example "chapter6-plugins" from "Tutorial: Writing QML extensions with C++" and i've got nothing.
@Application output - Starting e:\progr\Qt\4.7.0\bin\qmlviewer.exe -I e:/progr/Qt/4.7.0/imports E:/progr/Qt/4.7.0/examples/declarative/tutorials/extending/chapter6-plugins/app.qml
file:///E:/progr/Qt/4.7.0/examples/declarative/tutorials/extending/chapter6-plugins/app.qml:45:5: PieChart is not a type
PieChart {
^
@
I have not modified an example. The same situation under Qt 4.7.1 for mingw. What am i doing wrong? -
Do you have PieChart.qml file included on your project?
-
-
[quote author="Aleksei Mikhailichenko" date="1293355369"]Milot, PieChart is QDeclarativeExtensionPlugin. Yo can go to $QTDIR/examples/declarative/tutorials/extending/chapter6-plugins and look on this example.
Kxyu, I have installed qt-win-opensource-4.7.0-mingw.exe where all examples are already compiled. [/quote]
Strange enough. I just tried compiling the example on Mac and it works!
Also I was able to open the QML file with QMLViewer, can you try the same?
-
[quote author="Aleksei Mikhailichenko" date="1293358756"]i've tried example on vs2008 framework - and all works fine, but under mingw I have troubles with qml plugins loading[/quote]
Can you post the compiler error? The above error is QMLViewer error...
-
-
With turning on QML_IMPORT_TRACE i recieve this
@QDeclarativeImportDatabase::addToImport 0x10db4fec "." -1.-1 File as ""
QDeclarativeImportDatabase::add: loaded "E:/progr/Qt/4.7.0/examples/declarative/tutorials/extending/chapter6-plugins/qmldir"
QDeclarativeImportDatabase::importPlugin "E:.progr.Qt.4.7.0.examples.declarative.tutorials.extending.chapter6-plugins" from "E:/progr/Qt/4.7.0/examples/declarative/tutorials/extending/chapter6-plugins/lib/chapter6-plugins.dll"
QDeclarativeImportDatabase::addToImport 0x10db4fec "Qt" 4.7 Library as ""
QDeclarativeImportDatabase::resolveType "Item" = "QDeclarativeItem"
file:///E:/progr/Qt/4.7.0/examples/declarative/tutorials/extending/chapter6-plugins/app.qml:45:5: PieChart is not a type
PieChart {^ @
-
Strange enough!
Do you have contents (any lib, dll or something) under lib directory?
Here I have .dylib library for Mac OS.
-
Strange again.
Maybe someone who faced the issue can help us here, I will try that on the meantime on Windows.
-
[quote author="Aleksei Mikhailichenko" date="1293399772"]thnx, i will try to built 4.7 branch from gitorious and look plugin loading there[/quote]
That can work, and this is a bit an issue with not working examples, most of the developers are facing this issue which is also specified in "this article.":http://www.pluggd.in/nokia-qt-297/
-
Good to hear that! Can you mark this thread as [SOLVED] ?