@koahnig , sorry, actually, we need define one constructor for this, i define another macro,
#define BEGIN_MODEL(name)\
class name: public QObject\
{\
public:\
name(QObject *parent = 0): QObject(parent){}\
virtual ~name(){}
#define END_MODEL };
Then declare one model object like
BEGIN_MODEL(Person)
Q_OBJECT
PROPERTY(QString, name)
END_MODEL
i not move Q_OBJECT to macro BEGIN_MODEL, because it relate to qmake that generate moc_ files and cause error,
this is one way to simple define model,
ps: but using macro is not recommended, because it have some trouble for debug