diff options
Diffstat (limited to 'examples/qml/referenceexamples/grouped/person.h')
-rw-r--r-- | examples/qml/referenceexamples/grouped/person.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/qml/referenceexamples/grouped/person.h b/examples/qml/referenceexamples/grouped/person.h index 6f6caaee7c..df507c7386 100644 --- a/examples/qml/referenceexamples/grouped/person.h +++ b/examples/qml/referenceexamples/grouped/person.h @@ -52,6 +52,7 @@ #include <QObject> #include <QColor> +#include <QtQml/qqml.h> class ShoeDescription : public QObject { @@ -60,6 +61,7 @@ class ShoeDescription : public QObject Q_PROPERTY(QColor color READ color WRITE setColor) Q_PROPERTY(QString brand READ brand WRITE setBrand) Q_PROPERTY(qreal price READ price WRITE setPrice) + QML_ANONYMOUS public: ShoeDescription(QObject *parent = nullptr); @@ -88,6 +90,7 @@ class Person : public QObject // ![1] Q_PROPERTY(ShoeDescription *shoe READ shoe) // ![1] + QML_ANONYMOUS public: Person(QObject *parent = nullptr); @@ -103,6 +106,7 @@ private: class Boy : public Person { Q_OBJECT + QML_ELEMENT public: Boy(QObject * parent = nullptr); }; @@ -110,6 +114,7 @@ public: class Girl : public Person { Q_OBJECT + QML_ELEMENT public: Girl(QObject * parent = nullptr); }; |