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

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

$
0
0
Hi Guys, I have the following code.     QQmlEngine engine;     QQmlComponent component(&engine);     component.loadUrl(QUrl("qrc:/qml/main.qml"));     if ( !component.isReady() ) {         qWarning("%s", qPrintable(component.errorString()));         return -1;     }           QObject *topLevel = component.create();     EditorWindow *window = qobject_cast<EditorWindow *>(topLevel);       if ( !window ) {         qWarning("Error: Your root item has to be a Window.");         return -1;     }     window->show(); How do I set the context of the QWindow to a custom QOpenGLContext? I tried to Extend QWindow via EditorWindow but I get the error Your root item has to be a Window. I have seen this but cant quite implement it. http://qt-project.org/forums/viewthread/25268/

Viewing all articles
Browse latest Browse all 4972

Trending Articles