diff options
Diffstat (limited to 'examples/opengl/hellowindow/main.cpp')
-rw-r--r-- | examples/opengl/hellowindow/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp index 7d454f65a6..4a11aa1c7a 100644 --- a/examples/opengl/hellowindow/main.cpp +++ b/examples/opengl/hellowindow/main.cpp @@ -39,6 +39,8 @@ ****************************************************************************/ #include <QGuiApplication> +#include <QPlatformIntegration> +#include <private/qguiapplication_p.h> #include <QScreen> #include <QThread> @@ -48,7 +50,9 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - bool multipleWindows = !QGuiApplication::arguments().contains(QLatin1String("--single")); + const bool multipleWindows = + QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL) + && !QGuiApplication::arguments().contains(QLatin1String("--single")); QScreen *screen = QGuiApplication::primaryScreen(); |