[Qt-creator] Class boilerplate builder?

Jason H jhihn at gmx.com
Fri Dec 18 20:43:57 CET 2015


I'd be really cool if(tm):

There was a builder for QObject subclasses.

Given the class name, the base class, (already there) the next step would be a screen that would ask for property names and types and automatically build up the boilerplate code. I spend a lot of time now since QML is King making exposer classes for C++ to QML. I've got 140 lines of boilerplate code and only 77 of non-boilerplate. If I could enter:
QStringList propname1
QVariantList propname2
...
int x

and have it all populated I'm thinking a grid or rows of:
Combo Text Combo(Syntax) Check   Check    ...  // UI type
Class Name MEMBER/READ   Write   Notify   ...  // What for


And that screen to the new Class wizard would save me a lot of time. 




More information about the Qt-creator mailing list