[Development] Request moving project to playground area

Jesus Fernandez Jesus.Fernandez at qt.io
Fri Feb 3 10:18:13 CET 2017


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



More information about the Development mailing list