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

Extending QtQuick.Controls ApplicationWindow to set OpenGL format

$
0
0
Hello everyone, I am trying to write a simple OpenGL desktop application using QtQuick with QtQuick.Controls. In particular I want to make use of the MenuBar, StatusBar, ToolBar etc. features defined in ApplicationWindow, in addition to an OpenGL view. It seems like I need to set the OpenGL format before (or during) my Window class is instantiated. My question is how do I set the OpenGL format (to OpenGL 3.3 Core Profile) without extending a QQuickWindow class (which is used by ApplicationWindow in QML I think) and doing this in the constructor. Alternatively, is it possible to link ApplicationWindow to a C++ class somehow so I can provide a custom constructor. Is there a initialization callback where I can set the format? I am using the QQmlApplicationEngine to process the main QML file. Maybe I need to use another QML engine? Any help is greatly appreciated! Thank you!

Viewing all articles
Browse latest Browse all 4972

Trending Articles