diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp index d6802a8e208..5b2552ee3ee 100644 --- a/examples/opengl/hellowindow/main.cpp +++ b/examples/opengl/hellowindow/main.cpp @@ -51,8 +51,9 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - const bool multipleWindows = - QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL) + QPlatformIntegration *integ = QGuiApplicationPrivate::platformIntegration(); + const bool multipleWindows = integ->hasCapability(QPlatformIntegration::ThreadedOpenGL) + && integ->hasCapability(QPlatformIntegration::WindowManagement) && !QGuiApplication::arguments().contains(QStringLiteral("--single")); QScreen *screen = QGuiApplication::primaryScreen();