summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-09-01 13:22:21 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-09-01 13:41:00 (GMT)
commit8abc68d262c40c1f035a2d77779e76f038261a89 (patch)
tree196738718f4c4f2148b5a0dbc9dc444e0bf1655d /src/gui/kernel
parentdcdbb81f28bc8fc4bb7fedf78421e473413da1a7 (diff)
downloadQt-8abc68d262c40c1f035a2d77779e76f038261a89.zip
Qt-8abc68d262c40c1f035a2d77779e76f038261a89.tar.gz
Qt-8abc68d262c40c1f035a2d77779e76f038261a89.tar.bz2
Make sure the BSP is updated when a graphics effect changes bounding rect.
In the case of applying an effect to a QGraphicsItem, we have to notify the scene's BSP that the item's bounding rect has changed. We do this by calling prepareGeometryChange(). In the case of QWidget, it's sub-optimal that we update its parent, but there's no other way to solve it at the moment.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index ff0c453..f69c3a7 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -727,6 +727,16 @@ public:
inline bool isPixmap() const
{ return false; }
+ inline void effectBoundingRectChanged()
+ {
+ // ### This function should take a rect parameter; then we can avoid
+ // updating too much on the parent widget.
+ if (QWidget *parent = m_widget->parentWidget())
+ parent->update();
+ else
+ m_widget->update();
+ }
+
inline const QStyleOption *styleOption() const
{ return 0; }