forked from qt-creator/qt-creator
App: Set OpenGL backend using the Qt 6 API
Qt 6 would emit: "Qt::AA_UseOpenGLES is no longer supported in Qt 6" Let's set the backend to OpenGL it via environment variable. Setting it via QQuickWindow::setSceneGraphBackend would add a dependency on "quick". Fixes: QTCREATORBUG-25637 Change-Id: Ice53be9440c586008dea9ab3731050a63073bab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -537,9 +537,11 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#if defined(Q_OS_WIN) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
if (!qEnvironmentVariableIsSet("QT_OPENGL"))
|
if (!qEnvironmentVariableIsSet("QT_OPENGL"))
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||||
|
#else
|
||||||
|
qputenv("QT_QUICK_BACKEND", "opengl");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR")
|
if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR")
|
||||||
|
|||||||
Reference in New Issue
Block a user