From 937bb39ff2a3373bd66495a0e218ba072b106db0 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 13 Jun 2017 11:02:58 +0200 Subject: [PATCH] Work around slow painting on macOS This got prominent by removing the OpenGL based QQuickWidget from the Welcome mode. Basically painting is very slow to the point of unusable when there is no OpenGL widget in a window. The moment an OpenGL widget is in the widget hierarchy of a window, painting is much faster. This is especially notable on HiDPI screens, e.g. using 1.5x or 1x scaling on 4k monitors. This is also reproducible with older versions of Qt Creator when using additional editor windows or diabling Welcome mode. Restore the status quo by adding a dummy OpenGL widget to welcome mode on macOS. Task-number: QTBUG-61384 Change-Id: Ia1a4738dd2070d70d8be42d4d717099d3933248b Reviewed-by: hjk Reviewed-by: Vikas Pachdha --- src/plugins/welcome/welcomeplugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 8a34fdd4667..c7d6058012c 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -310,6 +311,12 @@ WelcomeMode::WelcomeMode() layout->addWidget(new StyledBar(m_modeWidget)); layout->addItem(hbox); + if (Utils::HostOsInfo::isMacHost()) { // workaround QTBUG-61384 + auto openglWidget = new QOpenGLWidget; + openglWidget->hide(); + layout->addWidget(openglWidget); + } + setWidget(m_modeWidget); }