diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-03-10 15:14:43 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-03-14 17:48:52 +0100 |
commit | 1ea73bc29b7542141bfcfa138cc194404c283bd5 (patch) | |
tree | 06f53912dc0c3f5e7bcc3d2ab039f2a321616bc7 /src/widgets/kernel/qwidget.cpp | |
parent | dd0c886783cb580db791666ea5a2478e0b2110c1 (diff) |
Fix losing QOpenGLWidget paints when a child widget is invisible
Pick-to: 6.3 6.2
Change-Id: I136b486d30e31acadd6b1b837dc7e834ee3e23fb
Fixes: QTBUG-101620
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 1527ec679f..3918a46da4 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -11049,6 +11049,13 @@ void QWidgetPrivate::update(T r) { Q_Q(QWidget); +#ifndef QT_NO_OPENGL + if (renderToTexture && !q->isVisible()) { + renderToTextureReallyDirty = 1; + return; + } +#endif + if (!q->isVisible() || !q->updatesEnabled()) return; |