diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-06-13 11:02:58 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-06-14 08:40:47 +0000 |
commit | 937bb39ff2a3373bd66495a0e218ba072b106db0 (patch) | |
tree | 2684ffb771f8493c280893b0ac3003c61c4e26a7 /src/plugins/welcome | |
parent | 460e1d7e939ae0e19a17ab26cfb6328aff706519 (diff) |
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 <hjk@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <QHeaderView> #include <QLabel> #include <QMouseEvent> +#include <QOpenGLWidget> #include <QPainter> #include <QStackedWidget> #include <QTimer> @@ -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); } |