[Development] Enumerations in QML
Charley Bay
charleyb123 at gmail.com
Tue Dec 11 16:50:40 CET 2012
>
> > People keep asking for enumerations in QML. <snip>,
> > Now I don't know when these issues will be
> > resolved, but there's an important discussion to have before it can
> > even be scheduled: What would proper enum support look like in QML?
> > <snip>,
>
> I'd prefer:
>
> Item {
> enum Weather { Raining, Sunny, Cloudy }
>
> property Weather weather: Weather.Sunny;
> }
>
+1 for enums (whatever the reasonable syntax).
If they are added, IMHO they should be available for identifying
"States/Transitions", since the "string-labels" that are currently used are
logically "enum" values.
And, I'd rather my QML code use the "token-unquoted" for identifying
states-and-transitions, because I'm lazy (less typing) and it looks
"cleaner" (QML was brilliant to not quote the "keys", like does JSON). ;-))
--charley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121211/7598997f/attachment.html>
More information about the Development
mailing list