[Interest] import c++ plugin

Дмитрий Козлов gnitry at mail.ru
Wed Oct 23 09:26:05 CEST 2013


22.10.2013 14:46, Damian Ivanov пишет:
> Hi all,
>
> I am still a beginner, so excuse me if I ask stupid questions :)
>
> I want to import a c++ plugin
> void QtProcessPlugin::registerTypes(const char *uri)
> {
>      // @uri QtProcess
>      qmlRegisterType<Process>(uri, 0, 1, "Process");
> }
>
> so I can use it in qml. How should I add it to my open project in qtcreator.
> Where should I put the qmldir file?
>
> Thanks in advance.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
Just see Qt standard example ( [QtDir]\examples\qml\plugins\ )
and
read this: 
http://qt-project.org/doc/qt-5.1/qtqml/qtqml-modules-cppplugins.html

You will find a qmldir file 
(examples\qml\plugins\imports\TimeExample\qmldir) and see how to import 
your plugin in QML ("import TimeExample 1.0")



More information about the Interest mailing list