diff options
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 4 | ||||
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index d2b059e..8f04b89 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3749,7 +3749,7 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR // Perform a normal (complete repaint) update in some cases: if ( // move-by-scroll requires QWidgetPrivate::isOpaque set - (isMove && qd->isOpaque == false) || + (isMove && q->testAttribute(Qt::WA_OpaquePaintEvent) == false) || // limited update on resize requires WA_StaticContents. (isResize && q->testAttribute(Qt::WA_StaticContents) == false) || @@ -4273,7 +4273,7 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r) HIRect bounds = CGRectMake(w->data->crect.x(), w->data->crect.y(), w->data->crect.width(), w->data->crect.height()); HIViewRef hiview = qt_mac_nativeview_for(w); - const bool opaque = qt_widget_private(w)->isOpaque; + const bool opaque = q->testAttribute(Qt::WA_OpaquePaintEvent); if (opaque) HIViewSetDrawingEnabled(hiview, false); diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index e65fef1..7b68732 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -3964,6 +3964,7 @@ public: :QWidget(parent) { setAttribute(Qt::WA_StaticContents); + setAttribute(Qt::WA_OpaquePaintEvent); setPalette(Qt::red); // Make sure we have an opaque palette. setAutoFillBackground(true); gotPaintEvent = false; |