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

Is it possible to set the root object of an QQuickView?

$
0
0
In C++ I created a QQuickItem and want to set this as the root object of a QQuickView. The following is a simplified part of my code: void MyClass::showItem(QQuickItem *item) {     //create the viewer     QQuickView *viewer = new QQuickView(m_engine, m_parent);       // here I want to set the item as root object       //show the viewer     viewer->show(); } The item and the view were created using the same engine (m_engine). Unfortunately there is no method like “setRootItem(QQuickItem*)”. Is there still the possibility to set the root item of a QQuickView? Thanks!

Viewing all articles
Browse latest Browse all 4972

Trending Articles