[Qt-creator] My small wish-list
Jason H
jhihn at gmx.com
Mon Feb 27 19:55:00 CET 2017
> I wanted to share my small wish-list, i think it's nothing big:
>
> 1* From the context menu on a 'Q_PROPERTY' macro, entry 'Generate
> missing Q_PROPERTY members...'
> - use emit (memberValue) instead of emit (parameterValue):
> sometimes the member value will be different from the parameter
> value, it is then easy to forget to replace the generated 'emit
> (parameterValue);' with 'emit (memberValue);', for the case where the
> code stays as-is, emit (memberValue) is synonym for emit
> (parameterValue):, so no regression here
> - if type is qreal, double, float, use 'qFuzzyCompare()' instead of '=='
> - very minor: the sub-menu entry ends with '...' which traditionally
> means that a pop-up dialog will show up, which is not the case.
>
> From the context menu on a the name of a class declaration:
> - It would be nice to add an entry 'Generate all missing Q_PROPERTY
> members', which as you bet is the same as above but applied to all
> Q_PROPERTY.
>
> 2* Finally, when creating a new class, which is is derived from
> QObject, it could be nice to insert an extra (optional) wizard page
> that allows to easily define all the properties we want the class to
> have.
>
> What do you guys think of this?
Since you asked, I've requested some of this same stuff.
For #1 above (numbers added) I've kinda stopped using that version of Q_PROPERTY (... READ... WRITE...) and use Q_PROPERTY (... MEMBER instead.
For #2, I've asked for this but I think it is substantial work for something that happens infrequently. While very handy in the beginning of a project, its value diminishes over time. So I have acquiesced to its non-existence. I'd rather see some more of the UI enhancements for maintaining code come first. Even though I would *love* to click a few things and have a skeleton class in no time, I just don't spend a whole lot to time doing it by hand.
However it would be really cool to have a form like:
Name:[classname] Derives from: [inherited list of classes]
Private Members:
[type |v] [name]
...
Q_Properties:
[type |v] [name], Member: [autoFromAboveAndName] Get: [*] [name] Set: [*] [setName], Notify: [nameChanged]
...
Methods:
[returnType |v] [name] Decorators: const [*]
Args:
[type] [name ] Decorators: const [*] &[*]
...
...
More information about the Qt-creator
mailing list