summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/binding/birthdayparty.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/binding/birthdayparty.h')
-rw-r--r--examples/declarative/extending/binding/birthdayparty.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/declarative/extending/binding/birthdayparty.h b/examples/declarative/extending/binding/birthdayparty.h
index 5651c65..8bdb76a 100644
--- a/examples/declarative/extending/binding/birthdayparty.h
+++ b/examples/declarative/extending/binding/birthdayparty.h
@@ -71,7 +71,7 @@ Q_OBJECT
// ![0]
Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant NOTIFY celebrantChanged)
// ![0]
-Q_PROPERTY(QmlList<Person *> *guests READ guests)
+Q_PROPERTY(QmlListProperty<Person> guests READ guests)
Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker)
Q_CLASSINFO("DefaultProperty", "guests")
public:
@@ -80,7 +80,9 @@ public:
Person *celebrant() const;
void setCelebrant(Person *);
- QmlList<Person *> *guests();
+ QmlListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
QString speaker() const;
void setSpeaker(const QString &);
@@ -94,7 +96,7 @@ signals:
private:
Person *m_celebrant;
- QmlConcreteList<Person *> m_guests;
+ QList<Person *> m_guests;
};
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)