View Full Version : qt quick plugin.

18th March 2011, 08:49
In this example :qt\examples\declarative\tutorials\extending\chapt er6-plugins, it extending QML,

qmlRegisterType<PieChart>(uri, 1, 0, "PieChart");
qmlRegisterType<PieSlice>(uri, 1, 0, "PieSlice");

it add two classes to QML, but where place the dll file? I had try some pathes, such as qt/imports and qt/plugins , they are all doesn't work.

who knows? thank you every much...

22nd April 2011, 09:18
when you write
import Qt 4.7 or
import myPlugin 1.0
QtCreator goes to the "qt/imports" directory and looks for a folder named "myPlugin". You should place your plugin.dll inside the folder you created with myPlugin name.
1. Create a folder whose name is myPlugin under the "qt/imports" directory.
2. Give that path in the pro file with DESTDIR = ../qt/imports/myPlugin
whenever you compile your program, it will create the dll inside that folder.
Hope it helps