Hello!
Thank you everyone for replying to this thread, I'm sorry for the late
response.
I have been fiddling with all of these for a while, and come to this
solution:
pragma Singleton
import QtQuick 2.7
QtObject {
property QtObject font : QtObject {
readonly property color red:
2016-05-02 17:31 GMT+03:00 Jérôme Godbout :
> Hello Sina, this will not work (at least up to 5.5 as far as I know).
> Cause QtObject doesn't have a default property to place children like Item
> have. You would get the following error while parsing your script:
> *Cannot assign to non-existent def
Hello Sina, this will not work (at least up to 5.5 as far as I know). Cause
QtObject doesn't have a default property to place children like Item have.
You would get the following error while parsing your script:
*Cannot assign to non-existent default property*
You can either make a simple object t
2016-04-29 21:34 GMT+03:00 Jérôme Godbout :
>
> QmlObject
> {
> readonly property alias myCategory: myCategory_
>
> QmlObject
> {
> id: myCategory_
> readonly property color red: "#FF0"
> }
> }
>
Hello Jérôme,
Can you please explain what would be different to use QtObject i
rote:
>>
>>> Those internal elements are not directly accessible.
>>>
>>> You can try exposing them with the use of *alias* in the root object.
>>>
>>>
>>>
>>>
>>>
>>> -Even
>>>
>>>
>>>
>>>
sen=
>> honeywell@qt-project.org] *On Behalf Of *Viktória Nemkin
>> *Sent:* 29. april 2016 13:04
>> *To:* interest@qt-project.org
>> *Subject:* [Interest] Clean way to define and categorize constants in QML
>>
>>
>>
>> Hello!
>>
>>
>>
g them with the use of *alias* in the root object.
>
>
>
>
>
> -Even
>
>
>
> *From:* Interest [mailto:interest-bounces+even.kristoffersen=
> honeywell@qt-project.org] *On Behalf Of *Viktória Nemkin
> *Sent:* 29. april 2016 13:04
> *To:* interest@qt-proje
-project.org
Subject: [Interest] Clean way to define and categorize constants in QML
Hello!
What is a clean way to define and categorize constants in QML?
I have came up with this so far:
I have a QML singleton element, named Theme. There I keep a few constant
things, like different background and
Using such approach you have to write something like readonly property
QtObject backgroundColor: QtObject { ...
On Fri, Apr 29, 2016 at 2:04 PM Viktória Nemkin
wrote:
> Hello!
>
> What is a clean way to define and categorize constants in QML?
>
> I have came up with this so far:
>
> I have a QML
Hello!
What is a clean way to define and categorize constants in QML?
I have came up with this so far:
I have a QML singleton element, named Theme. There I keep a few constant
things, like different background and font colors.
Theme.qml:
pragma Singleton
import QtQuick 2.0
QtObject {
re
10 matches
Mail list logo