Hello Qt community.
I’m trying to open QML file from C++ with this code:
QQmlEngine *engine = new QQmlEngine;
QQmlComponent component(engine, QUrl::fromLocalFile("form.qml"));
QObject *myObject = component.create();
QQuickItem *item = qobject_cast<QQuickItem *>(myObject);
But window don’t show.
↧