diff options
Diffstat (limited to 'examples/qml/referenceexamples/coercion/person.h')
-rw-r--r-- | examples/qml/referenceexamples/coercion/person.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/qml/referenceexamples/coercion/person.h b/examples/qml/referenceexamples/coercion/person.h index 692cf4eb19..6865e0093a 100644 --- a/examples/qml/referenceexamples/coercion/person.h +++ b/examples/qml/referenceexamples/coercion/person.h @@ -51,12 +51,16 @@ #define PERSON_H #include <QObject> +#include <QtQml/qqml.h> class Person : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize) + //![0] + QML_ANONYMOUS + //![0] public: Person(QObject *parent = nullptr); @@ -75,6 +79,7 @@ private: class Boy : public Person { Q_OBJECT + QML_ELEMENT public: Boy(QObject * parent = nullptr); }; @@ -83,6 +88,7 @@ public: class Girl : public Person { Q_OBJECT + QML_ELEMENT public: Girl(QObject * parent = nullptr); }; |