On Thursday, February 02, 2017 07:38:00 PM Hamed Masafi wrote:
> Declaring persistant objects in ORM is straightforward:
>
> class Comment : public Table
> {
> Q_OBJECT
>
> NUT_PRIMARY_AUTO_INCREMENT(id)
> NUT_DECLARE_FIELD(int, id, id, setId)
> NUT_DECLARE_FIELD(QString, message, message, setMessage)
> NUT_DECLARE_FIELD(QDateTime, saveDate, saveDate, setSaveDate)
> NUT_DECLARE_FIELD(qreal, point, point, setPoint)
>
> NUT_FOREGION_KEY(Post, int, post, post, setPost)
>
> public:
> Q_INVOKABLE explicit Comment(QObject *tableSet = 0);
> };
Why not using Q_PROPERTY instead of NUT_DECLARE_FIELD?
And what's the reason to have a constructor as Q_INVOKABLE?
--
Best regards,
Jesus
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development