Set QSG_RHI_BACKEND to opengl

in order to prevent a crash ancompanying the console output:
QQuickWidget is only supported on OpenGL.
Use QQuickWindow::setGraphicsApi() to override the default

Change-Id: Iab7c0cc486b150723000cc11ba4c6d9cd4be8b03
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Knud Dollereder
2021-05-25 15:26:08 +02:00
parent ef5423d6ce
commit af4ce2fbe6

View File

@@ -541,7 +541,7 @@ int main(int argc, char **argv)
if (!qEnvironmentVariableIsSet("QT_OPENGL"))
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
#else
qputenv("QT_QUICK_BACKEND", "opengl");
qputenv("QSG_RHI_BACKEND", "opengl");
#endif
if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR")