[Qt-creator] Add new C++ class wizard

Jason H jhihn at gmx.com
Wed May 4 22:19:55 CEST 2016


> 2016-05-04 21:02 GMT+02:00 Jason H <jhihn at gmx.com>:
> >> If I tell it to "Include QObject" and I'm deriving from a "Q" object, then shouldn't the wizard:
> >> 1. #include <baseclass> in the .h?
> >> 2. provide me with a constructor in the form of class(QObject *parent=0) in the .h
> >> 3. provide me with a constructor in the form of derivedclass::derivedclass(QObject *parent): baseclass(parent) in the .cpp
> >
> > 4. Copy pure virtual function defs
> > 5. Maybe virtual function defs too
> > 6. Check project that class in in qt modules defined in the project, and if not, offer to add.
> > _______________________________________________
> > Qt-creator mailing list
> > Qt-creator at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/qt-creator
> 
> I agree that the class wizard could be enhanced.
> 
> I was used to the previous class wizard and I feel like the new one
> isn't better.
> For instance the points 1, 2 and 3 were covered.
> 
> For points 4 or 5, I would not want them to be automatic. They could
> be opt-in, but I do not really feel the need
> as the refactor tool offers a complete wizard for reimplementing
> virtual functions.

Thanks, but for 4, you don't have a usable class unless you implement the pure virtual functions...



More information about the Qt-creator mailing list