aboutsummaryrefslogtreecommitdiffstats
path: root/src/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls')
-rw-r--r--src/controls/qquickcontainer.cpp1
-rw-r--r--src/controls/qquickcontainer_p.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/controls/qquickcontainer.cpp b/src/controls/qquickcontainer.cpp
index 5138dc95..20b900a2 100644
--- a/src/controls/qquickcontainer.cpp
+++ b/src/controls/qquickcontainer.cpp
@@ -57,6 +57,7 @@ void QQuickContainerPrivate::init()
Q_Q(QQuickContainer);
contentModel = new QQmlObjectModel(q);
QObject::connect(contentModel, &QQmlObjectModel::countChanged, q, &QQuickContainer::countChanged);
+ QObject::connect(contentModel, &QQmlObjectModel::childrenChanged, q, &QQuickContainer::contentChildrenChanged);
}
void QQuickContainerPrivate::cleanup()
diff --git a/src/controls/qquickcontainer_p.h b/src/controls/qquickcontainer_p.h
index 22fa059a..8fe35faf 100644
--- a/src/controls/qquickcontainer_p.h
+++ b/src/controls/qquickcontainer_p.h
@@ -61,7 +61,7 @@ class Q_QUICKCONTROLS_EXPORT QQuickContainer : public QQuickControl
Q_PROPERTY(int count READ count NOTIFY countChanged FINAL)
Q_PROPERTY(QVariant contentModel READ contentModel CONSTANT FINAL)
Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL)
- Q_PROPERTY(QQmlListProperty<QQuickItem> contentChildren READ contentChildren FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickItem> contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL)
Q_CLASSINFO("DefaultProperty", "contentData")
public:
@@ -81,6 +81,7 @@ public:
Q_SIGNALS:
void countChanged();
+ void contentChildrenChanged();
protected:
QQuickContainer(QQuickContainerPrivate &dd, QQuickItem *parent);