Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Add QQmlComponent into QQuickView
drategon last edited by
old code qt4
QString QmlFile = "qml/No2Screen.qml";
QDeclarativeComponent No2Component(m_View->engine(), QUrl::fromLocalFile(QmlFile )); m_No2Item = qobject_cast<QDeclarativeItem *>(No2Component.create()); connect(m_No2Item , SIGNAL(hidden()), this, SLOT(destroyNo2Screen()), Qt::QueuedConnection); m_View->scene()->addItem(m_No2Item );
In qt5 :
I've changed like below, but how to additem since quickView has not scence()->addItem?
m_No2Item = qobject_cast<QQuickItem *>(No2Component.create());
taferl last edited by
I have the same problem here! Any news on that issue? How did you solve it?