[Solved]How to use Declarative Plugins
-
Please,
could anyone tell me how to use dlls which was created in \examples\declarative\cppextensions -
-
Thankyou Vass
this topic is not usefull
-
I mean if I have just the Dll without any headers how I can use it?
-
If you dont have the headers, how should you use the classes? It's not really possible. You can create the headers on your own by hand (which is very error prone) or they only contain plug-ins. But without headers, no class usage (also not from dlls).
If the dlls contain real plugins, you put them in the same folder as the application. Then they will be found by Qt.
See in the "documentation":http://doc.qt.nokia.com/4.7/gettingstartedqml.html#importing-a-plugin-in-qml
bq. The qmlviewer tool imports files that are in the same directory as the application. We can also create a qmldir file containing the locations of QML files we wish to import. The qmldir file can also store locations of plugins and other resources.
@
In qmldir:Button ./Button.qml FileDialog ./FileDialog.qml TextArea ./TextArea.qml TextEditor ./TextEditor.qml EditMenu ./EditMenu.qml plugin FileDialog plugins__
@
-
thank you Mr Gerolf Reinwardt
even if I have the headers I tested all the examples I find no thing
-
Works here and I can't see how it could fail.
You must have the plugin line in the .qmldir file as Gerolf explained.
In program.qmldir:
@plugin FileDialog plugins@
this means your directory structure should look like:
@program.qmldir
plugins/FileDialog.dll@ -
do you meen the file qmldir its contents are this lines
Clock 1.0 Clock.qml
plugin qmlqtimeexamplepluginwhen build plugins example:
declarative\cppextensions\plugins\com\nokia\TimeExample
-
ah
ok it is clear now
thank you Xsacha