diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2023-04-22 13:06:42 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-06-07 10:32:45 +0000 |
commit | 716a3270581ff3f21d13068a3979676787cf8c80 (patch) | |
tree | 77aa22b05d126c0b18e9e4d0df32da4124eb6531 /src | |
parent | 5f44b2a151a1619b6279686f34322cfd23af3ea7 (diff) |
Fix non-OpenGL RHI with Qt 6.2
Non-OpenGL support was only working in QQuickWidget in 6.4.0
Change-Id: I5fbf55a95df419b125e803333b07a595f6d11461
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit 88cbf24c2377ab17941c79e615b7c5122a67ada2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/api/qtwebenginecoreglobal.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp index 9082052f2..82bd1c4d2 100644 --- a/src/core/api/qtwebenginecoreglobal.cpp +++ b/src/core/api/qtwebenginecoreglobal.cpp @@ -214,8 +214,12 @@ static void initialize() // QCoreApplication is not yet instantiated, ensuring the call will be deferred qAddPreRoutine(QtWebEngineCore::initialize); auto api = QQuickWindow::graphicsApi(); - if (api != QSGRendererInterface::OpenGL && api != QSGRendererInterface::Vulkan - && api != QSGRendererInterface::Metal && api != QSGRendererInterface::Direct3D11) + if (api != QSGRendererInterface::OpenGL +#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) + && api != QSGRendererInterface::Vulkan + && api != QSGRendererInterface::Metal && api != QSGRendererInterface::Direct3D11 +#endif + ) QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL); #endif // QT_CONFIG(opengl) } |