[Qt-qml] how can I change the property of QML element in C++ application?

Wei, James james.wei at intel.com
Fri Aug 27 10:52:39 CEST 2010


I have a QML file and I want to integrate it into a graphics view framework based UI application written in C++.

   QDeclarativeEngine *engine = new QDeclarativeEngine;
   QDeclarativeComponent component(engine, QUrl::fromLocalFile("Button.qml"));
   QGraphicsObject *object =
           qobject_cast<QGraphicsObject *>(component.create());
   scene->addItem(object);

How can I change the property of the element in C++ application?

Thanks

James


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100827/63c109a4/attachment.html 


More information about the Qt-qml mailing list