diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-14 13:45:20 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-14 13:47:56 (GMT) |
commit | d45795809de0d5c4bb7a8c4dfd0b786373350c14 (patch) | |
tree | 339198cfacf1765eddc2047c348f6c5e2c16cdd0 /src/gui/widgets/qabstractscrollarea.cpp | |
parent | ed52c2f402b99541553aac163029d217f1dcd419 (diff) | |
download | Qt-d45795809de0d5c4bb7a8c4dfd0b786373350c14.zip Qt-d45795809de0d5c4bb7a8c4dfd0b786373350c14.tar.gz Qt-d45795809de0d5c4bb7a8c4dfd0b786373350c14.tar.bz2 |
Ensure style option for drawing blank area in scrollarea is initialized.
Then you can actually influence it's palette.
Task-number: 253495
Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui/widgets/qabstractscrollarea.cpp')
-rw-r--r-- | src/gui/widgets/qabstractscrollarea.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 9886969..0d8b4de 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -873,21 +873,22 @@ bool QAbstractScrollArea::event(QEvent *e) case QEvent::Resize: d->layoutChildren(); break; - case QEvent::Paint: + case QEvent::Paint: { + QStyleOption option; + option.initFrom(this); if (d->cornerPaintingRect.isValid()) { - QStyleOption option; option.rect = d->cornerPaintingRect; QPainter p(this); style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this); } #ifdef Q_WS_MAC if (d->reverseCornerPaintingRect.isValid()) { - QStyleOption option; option.rect = d->reverseCornerPaintingRect; QPainter p(this); style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this); } #endif + } QFrame::paintEvent((QPaintEvent*)e); break; #ifndef QT_NO_CONTEXTMENU |