diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index 768b227ecd..533d6b17b1 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -1590,6 +1590,9 @@ void tst_QRhi::renderToWindowSimple() QScopedPointer window(new QWindow); switch (impl) { case QRhi::OpenGLES2: +#if QT_CONFIG(opengl) + window->setFormat(QRhiGles2InitParams::adjustedFormat()); +#endif Q_FALLTHROUGH(); case QRhi::D3D11: window->setSurfaceType(QSurface::OpenGLSurface);