diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2012-05-28 16:13:24 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-29 20:13:11 +0200 |
commit | 618ea643cafa106ca6d833eccf4bf348171c8f89 (patch) | |
tree | 189e1d1a3685fdd8550e088d82e26e8634ade352 /src/widgets/kernel/qapplication_qpa.cpp | |
parent | 4d0424b671a2cac8b1e8035f604ead9dbeae547b (diff) |
Fix some painting issues with native widgets
QWidgetPrivate::drawWidget was missing an important line about marking
native widgets dirty compared to 4.8, which caused all other widgets
besides the native one to not repaint unless window was resized in such
a way that the widgets would get hidden and then re-exposed.
The above didn't fix repainting issues when moving native widgets
(e.g. widgets in QMdiArea subwindows or just calling QWidget::move()).
Added setting widgets dirty to QWidgetWindow::handleExposeEvent to
address this issue.
If there is one native widget, Qt enforces that all widgets in same
parent hierarchy are native - presumably to get overlapping widgets
drawing correctly. However, qapplication_qpa.cpp set the attribute
Qt::AA_DontCreateNativeWidgetSiblings for all applications, which
caused only the parents of native windows be forced native, leading to
drawing artifacts related to siblings of native widgets (e.g.
overlapping QMdiArea subwindows). I don't see a reason for setting this
flag indiscriminately for all applications, so removed it.
Also added setting newly created QWindow visible if associated
widget is already visible, which can happen if regular widgets
are shown before the first native widget is shown and retroactively
forces other widgets native.
Task-number:QTBUG-25805
Change-Id: Ib133dae9b13cc6e7155e7cae00fc1339d3b5ae86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qapplication_qpa.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication_qpa.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index e737fe1d8d..869cb7c255 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -426,7 +426,6 @@ void qt_init(QApplicationPrivate *priv, int type) Q_UNUSED(priv); Q_UNUSED(type); - qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); QColormap::initialize(); if (const QPalette *toolTipPalette = QGuiApplicationPrivate::platformTheme()->palette(QPlatformTheme::ToolTipPalette)) |