diff options
Diffstat (limited to 'examples/declarative/extending/grouped/person.h')
-rw-r--r-- | examples/declarative/extending/grouped/person.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/examples/declarative/extending/grouped/person.h b/examples/declarative/extending/grouped/person.h index 216c015..a031e69 100644 --- a/examples/declarative/extending/grouped/person.h +++ b/examples/declarative/extending/grouped/person.h @@ -43,14 +43,14 @@ #include <QObject> #include <QColor> -#include <qdeclarative.h> -class ShoeDescription : public QObject { -Q_OBJECT -Q_PROPERTY(int size READ size WRITE setSize) -Q_PROPERTY(QColor color READ color WRITE setColor) -Q_PROPERTY(QString brand READ brand WRITE setBrand) -Q_PROPERTY(qreal price READ price WRITE setPrice) +class ShoeDescription : public QObject +{ + Q_OBJECT + Q_PROPERTY(int size READ size WRITE setSize) + Q_PROPERTY(QColor color READ color WRITE setColor) + Q_PROPERTY(QString brand READ brand WRITE setBrand) + Q_PROPERTY(qreal price READ price WRITE setPrice) public: ShoeDescription(QObject *parent = 0); @@ -72,11 +72,12 @@ private: qreal m_price; }; -class Person : public QObject { -Q_OBJECT -Q_PROPERTY(QString name READ name WRITE setName) +class Person : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString name READ name WRITE setName) // ![1] -Q_PROPERTY(ShoeDescription *shoe READ shoe) + Q_PROPERTY(ShoeDescription *shoe READ shoe) // ![1] public: Person(QObject *parent = 0); @@ -90,14 +91,16 @@ private: ShoeDescription m_shoe; }; -class Boy : public Person { -Q_OBJECT +class Boy : public Person +{ + Q_OBJECT public: Boy(QObject * parent = 0); }; -class Girl : public Person { -Q_OBJECT +class Girl : public Person +{ + Q_OBJECT public: Girl(QObject * parent = 0); }; |