summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/attached/birthdayparty.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/attached/birthdayparty.h')
-rw-r--r--examples/declarative/extending/attached/birthdayparty.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/declarative/extending/attached/birthdayparty.h b/examples/declarative/extending/attached/birthdayparty.h
index bd8952b..9ba0f8b 100644
--- a/examples/declarative/extending/attached/birthdayparty.h
+++ b/examples/declarative/extending/attached/birthdayparty.h
@@ -65,7 +65,7 @@ class BirthdayParty : public QObject
{
Q_OBJECT
Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QmlList<Person *> *guests READ guests)
+Q_PROPERTY(QmlListProperty<Person> guests READ guests)
Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
@@ -73,12 +73,14 @@ public:
Person *celebrant() const;
void setCelebrant(Person *);
- QmlList<Person *> *guests();
+ QmlListProperty<Person> guests();
+ int guestCount() const;
+ Person *guest(int) const;
static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
private:
Person *m_celebrant;
- QmlConcreteList<Person *> m_guests;
+ QList<Person *> m_guests;
};
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)