summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxlayouts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/fx/qfxlayouts.cpp')
-rw-r--r--src/declarative/fx/qfxlayouts.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxlayouts.cpp b/src/declarative/fx/qfxlayouts.cpp
index da34b8c..836e3e4 100644
--- a/src/declarative/fx/qfxlayouts.cpp
+++ b/src/declarative/fx/qfxlayouts.cpp
@@ -253,9 +253,15 @@ void QFxBaseLayout::componentComplete()
preLayout();
}
-void QFxBaseLayout::childrenChanged()
+QVariant QFxBaseLayout::itemChange(GraphicsItemChange change,
+ const QVariant &value)
{
- preLayout();
+ if (change == ItemChildAddedChange ||
+ change == ItemChildRemovedChange) {
+ preLayout();
+ }
+
+ return QFxItem::itemChange(change, value);
}
bool QFxBaseLayout::event(QEvent *e)