summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/adding/person.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/adding/person.h')
-rw-r--r--examples/declarative/extending/adding/person.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/declarative/extending/adding/person.h b/examples/declarative/extending/adding/person.h
index fbaf2df..d6de9a9 100644
--- a/examples/declarative/extending/adding/person.h
+++ b/examples/declarative/extending/adding/person.h
@@ -43,12 +43,11 @@
#include <QObject>
// ![0]
-#include <qdeclarative.h>
-
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -57,11 +56,11 @@ public:
int shoeSize() const;
void setShoeSize(int);
+
private:
QString m_name;
int m_shoeSize;
};
-QML_DECLARE_TYPE(Person);
// ![0]
#endif // PERSON_H