New generated static functions
Posted: Tue Jan 24, 2017 11:07 am
You have the description field, which is great. Now how about adding static functions like the
but for the descriptions:
And then using those when setting the description of pData:
The translations could be even more useful, if the object is derived from QObject and has the Q_OBJECT macro.
- 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.