The answer to your titular question is, "Yes". I know one way to go about dropping QML into a ui, but I don't know if this helps you:

Qt Code:
  1. // inside custom QGraphicsView class...
  2.  
  3. ...
  4.  
  5. QGraphicsObject *qmlThing = getQMLGraphicsObjectFromURL(QUrl("pathToYourURL"));
  6. myScene->addItem(qmlThing);
  7.  
  8. ...
  9.  
  10. QGraphicsObject * MyGraphicsView::getQMLGraphicsObjectFromURL(const QUrl &url) {
  11. QDeclarativeComponent component(new QDeclarativeEngine(), url);
  12. QObject *object = component.create();
  13. return qobject_cast<QGraphicsObject *>(object);
  14. }
To copy to clipboard, switch view to plain text mode