aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/signal/birthdayparty.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/referenceexamples/signal/birthdayparty.h')
-rw-r--r--examples/qml/referenceexamples/signal/birthdayparty.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/qml/referenceexamples/signal/birthdayparty.h b/examples/qml/referenceexamples/signal/birthdayparty.h
index 9aecc8929c..c815518291 100644
--- a/examples/qml/referenceexamples/signal/birthdayparty.h
+++ b/examples/qml/referenceexamples/signal/birthdayparty.h
@@ -59,6 +59,7 @@ class BirthdayPartyAttached : public QObject
{
Q_OBJECT
Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+ QML_ANONYMOUS
public:
BirthdayPartyAttached(QObject *object);
@@ -75,6 +76,8 @@ class BirthdayParty : public QObject
Q_PROPERTY(Person *host READ host WRITE setHost)
Q_PROPERTY(QQmlListProperty<Person> guests READ guests)
Q_CLASSINFO("DefaultProperty", "guests")
+ QML_ELEMENT
+ QML_ATTACHED(BirthdayPartyAttached)
public:
BirthdayParty(QObject *parent = nullptr);
@@ -97,6 +100,5 @@ private:
Person *m_host;
QList<Person *> m_guests;
};
-QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
#endif // BIRTHDAYPARTY_H