diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 8ea68087cf9..b6f74369ae5 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -398,6 +398,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 310d5d4c8ac..72121e94449 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" @@ -333,7 +334,18 @@ QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const QPlatformBackingStore *QQnxIntegration::createPlatformBackingStore(QWindow *window) const { qIntegrationDebug(); - return new QQnxRasterBackingStore(window); + QSurface::SurfaceType surfaceType = window->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)