Page 1 of 1

New generated static functions

PostPosted: Tue Jan 24, 2017 11:07 am
by jimmytaker
You have the description field, which is great. Now how about adding static functions like the
Code: Select all
static QString column_XX();

but for the descriptions:
Code: Select all
static QString column_desc_XX() { return QObject::tr("Translatable description"); }

And then using those when setting the description of pData:
Code: Select all
pData->setDescription(column_desc_XX());

The translations could be even more useful, if the object is derived from QObject and has the Q_OBJECT macro.

Re: New generated static functions

PostPosted: Mon Jan 30, 2017 8:21 am
by qxorm
Hello,

Thank you for your suggestion !
I think that this kind of feature is useful as you said if your persistent class inherits from QObject.

So I would recommend to use the Javascript engine of QxEntityEditor to customize C++ exports : http://www.qxorm.com/qxorm_en/manual_qx ... #js_engine
I think this js engine is flexible enough to allow you to provide this static methods in your classes.