[Qt-creator] "new class" feature suggestions

qt.dantec at free.fr qt.dantec at free.fr
Sat Apr 21 11:25:36 CEST 2012


When using the "new class" option, we have to type the base class
information.

Unfortunately, this dialog box is modal, and when you forgot the exact
name of the base class, you have to cancel, lookup the name, and then
start over.

Since we have auto-completion working on class names, why not using it
to allow completion on the base class name ?

And since we would then know which file it is defined in, why not
#including that file name in the new class headers, so that the new
class would compile right out of the box (not the case now, except for
base classes) ?

Even better, knowing the base class, we could properly auto-fill the
Type Information field, making creating a new class stupid errors
prone (am I the only one to sometimes forget to add the Q_OBJECT macro
when needed ?)

Also useful would be :
- the automatic inclusion of a text message at the head of the new
files, typically the usual copyright & author's message ;
- to allow "new class" on an existing file, allowing to add the new
class to selected file header and source, instead of helping bloat the
number of files in a project.

Finally, total nirvana would be to have a list of virtual methods from
base(s) class show up and let the programmer select those that need
re-implementation, and hence copy their prototype in the header and
source files...

Anyway, thank's for an already awesome piece of software !

Quentin



More information about the Qt-creator mailing list