diff options
author | J-P Nurmi <jpnurmi@gmail.com> | 2009-09-30 18:18:23 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-12-03 09:36:54 (GMT) |
commit | 3f18623dd8f26857d9af032c41095818f5346910 (patch) | |
tree | 35efdb96b3b7794e949c2d7af7004e665238e29f /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | b93000823d11575b6c30490ea97a2649a0119f86 (diff) | |
download | Qt-3f18623dd8f26857d9af032c41095818f5346910.zip Qt-3f18623dd8f26857d9af032c41095818f5346910.tar.gz Qt-3f18623dd8f26857d9af032c41095818f5346910.tar.bz2 |
Added QGraphicsWidget::autoFillBackground property.
This add a property to QGraphicsWidget to fill its
background. QWidget has the same.
Merge-Request: 1656
Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 8777cdc..82d2e2f 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4187,6 +4187,8 @@ static void _q_paintItem(QGraphicsItem *item, QPainter *painter, widgetItem->paintWindowFrame(painter, option, widget); if (painterStateProtection) painter->restore(); + } else if (widgetItem->autoFillBackground()) { + painter->fillRect(option->exposedRect, widgetItem->palette().window()); } widgetItem->paint(painter, option, widget); |