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

[SOLVED] How do I set the QTOpenGLContext of a qml window before I run it.

$
0
0
Hi guys think I have solved this for anyone else looking to do it. QGuiApplication app( argc, argv );         QQuickWindow window;     QQmlEngine engine;     QQmlComponent component(&engine, QUrl::fromLocalFile(QLatin1String("qml/main.qml")));       QQuickItem *item = qobject_cast<QQuickItem*>(component.create());     item->setParentItem(window.contentItem());     qDebug() << item;       window.show();         return app.exec() you cast back to a qquickitem and set our window as the parent like so. Thanks again zapB

Viewing all articles
Browse latest Browse all 4972

Trending Articles