[Qt-qml] Using QML types within C++
Jamil Naja
jamil.m.naja at gmail.com
Fri Feb 4 15:43:56 CET 2011
Hi,
I have seen some examples to instantiate objects of QML types from C++ here
is an example:
QDeclarativeEngine *engine = new QDeclarativeEngine;
QDeclarativeComponent component(engine, QUrl::fromLocalFile("main.qml"));
QObject *myObject = component.create();
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(myObject);
Instead of "main.qml" is there anyway to pass a reference to
a registered qml type (a one that I defined in QML extension plugin)?
Regards,
Jamil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110204/badea31c/attachment.html
More information about the Qt-qml
mailing list