[Interest] Clean way to define and categorize constants in QML

Sina Dogru sinadooru at gmail.com
Sat Apr 30 21:35:49 CEST 2016


2016-04-29 21:34 GMT+03:00 Jérôme Godbout <jerome at bodycad.com>:

>
> QmlObject
> {
>   readonly property alias myCategory: myCategory_
>
>   QmlObject
>   {
>      id: myCategory_
>      readonly property color red: "#FF00000"
>   }
> }
>

Hello Jérôme,

Can you please explain what would be different to use QtObject instead of
QmlObject,

QtObject {
    readonly property alias myCategory: myCategory_

    QtObject {
        id: myCategory_
        readonly property color red: "#FF0000"
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160430/0a97f82b/attachment.html>


More information about the Interest mailing list