diff options
Diffstat (limited to 'examples/qml/referenceexamples/binding/birthdayparty.h')
-rw-r--r-- | examples/qml/referenceexamples/binding/birthdayparty.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/qml/referenceexamples/binding/birthdayparty.h b/examples/qml/referenceexamples/binding/birthdayparty.h index 15e1908ece..3cd5cf1c9a 100644 --- a/examples/qml/referenceexamples/binding/birthdayparty.h +++ b/examples/qml/referenceexamples/binding/birthdayparty.h @@ -60,6 +60,7 @@ class BirthdayPartyAttached : public QObject { Q_OBJECT Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged) + QML_ANONYMOUS public: BirthdayPartyAttached(QObject *object); @@ -82,6 +83,8 @@ class BirthdayParty : public QObject Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) Q_CLASSINFO("DefaultProperty", "guests") + QML_ELEMENT + QML_ATTACHED(BirthdayPartyAttached) public: BirthdayParty(QObject *parent = nullptr); @@ -107,6 +110,4 @@ private: QList<Person *> m_guests; }; -QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES) - #endif // BIRTHDAYPARTY_H |