Only set graphics API when using Qt6

This commit is contained in:
Tobias Fella
2023-09-01 17:22:09 +02:00
committed by James Graham
parent 774121ea8c
commit 8359c1fe90

View File

@@ -147,8 +147,10 @@ int main(int argc, char *argv[])
#ifdef HAVE_WEBVIEW
QtWebView::initialize();
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
#endif
#endif
#ifdef Q_OS_ANDROID
QGuiApplication app(argc, argv);