diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 9f76e7afa1f..aed66563a79 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -414,6 +414,12 @@ qt_internal_extend_target(Gui CONDITION APPLE ${FWImageIO} ) +qt_internal_extend_target(Gui CONDITION QNX + SOURCES + painting/qrasterbackingstore.cpp painting/qrasterbackingstore_p.h + painting/qrhibackingstore.cpp painting/qrhibackingstore_p.h +) + qt_internal_extend_target(Gui CONDITION QT_FEATURE_animation SOURCES animation/qguivariantanimation.cpp diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index cc10f6a00e2..b308c956f29 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -49,6 +49,7 @@ #include #include +#include #if !defined(QT_NO_OPENGL) #include "qqnxglcontext.h" @@ -328,8 +329,19 @@ QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const QPlatformBackingStore *QQnxIntegration::createPlatformBackingStore(QWindow *window) const { - qCDebug(lcQpaQnx) << Q_FUNC_INFO; - return new QQnxRasterBackingStore(window); + QSurface::SurfaceType surfaceType = window->surfaceType(); + qCDebug(lcQpaQnx) << Q_FUNC_INFO << surfaceType; + switch (surfaceType) { + case QSurface::RasterSurface: + return new QQnxRasterBackingStore(window); +#if !defined(QT_NO_OPENGL) + // Return a QRhiBackingStore for non-raster surface windows + case QSurface::OpenGLSurface: + return new QRhiBackingStore(window); +#endif + default: + return nullptr; + } } #if !defined(QT_NO_OPENGL)