From 8359c1fe904d1680f11dde2a881bdc2aedd59506 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 1 Sep 2023 17:22:09 +0200 Subject: [PATCH] Only set graphics API when using Qt6 --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index c52f68a65..dd62dd52c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);