Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

how to add QML widgets in QGraphicsScene version QtQuick 2.0

$
0
0
Hi everyone! how to add qml widget in QGraphicsScene version QtQuick 2.0? In The documentation only found out how to add widgets version QtQuick 1.0, and version QtQuick 2.0 no. QGraphicsScene* scene = myExistingGraphicsScene();  QDeclarativeEngine *engine = new QDeclarativeEngine;  QDeclarativeComponent component(engine, QUrl::fromLocalFile("myqml.qml"));  QGraphicsObject *object =      qobject_cast<QGraphicsObject *>(component.create());  scene->addItem(object);

Viewing all articles
Browse latest Browse all 4972

Trending Articles