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@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") _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest