aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickwidgets
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-05-13 12:47:08 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-05-17 10:24:10 +0000
commit4b4cf31c7a4bcb89cabca09102c4e0a22ab0c6b1 (patch)
tree0138d489add87f082cde2a6b957cc14cbb9f91fc /src/quickwidgets
parent11a184758c4fff1f634b294e22e8982ba9c43fc4 (diff)
QQuickWidget: update() when resetting updatePending in showEvent()
If updatePending is set, that means we want to call update() eventually. If we just reset updatePending without calling update(), we produce UI glitches. Change-Id: Ie7353b2f5da567e196dbee8c113920e0e4702304 Task-number: QTCREATORBUG-16022 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/quickwidgets')
-rw-r--r--src/quickwidgets/qquickwidget.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 2120be768c..1a840b44bd 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -1099,12 +1099,16 @@ void QQuickWidget::mouseDoubleClickEvent(QMouseEvent *e)
void QQuickWidget::showEvent(QShowEvent *)
{
Q_D(QQuickWidget);
- d->updatePending = false;
d->createContext();
- if (d->offscreenWindow->openglContext())
+ if (d->offscreenWindow->openglContext()) {
d->render(true);
- else
+ if (d->updatePending) {
+ d->updatePending = false;
+ update();
+ }
+ } else {
triggerUpdate();
+ }
QWindowPrivate *offscreenPrivate = QWindowPrivate::get(d->offscreenWindow);
if (!offscreenPrivate->visible) {
offscreenPrivate->visible = true;