You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have several issues/questions regarding the usage of {/} in properties.
In QML by Qt I often use something like this (in a more complex way) to assign values to properties:
property int test: {
if (a) {
return 1;
} else {
return 2;
}
}
I know this particular case is possible with something like this
property int test: a ? 1 : 2
but for more complex cases the first option is needed.
My second issue is when trying to declare a js-object like this:
property var test: {
"a": "b"
}
it is not giving an error but when having more then one entry
property var test: {
"a": "b",
"c": "d"
}
I get this error:
"a": "b",
^-- Expected string or identifier as object key
Am I doing anything wrong or are both cases not really implemented yet?
The text was updated successfully, but these errors were encountered:
I have several issues/questions regarding the usage of {/} in properties.
In QML by Qt I often use something like this (in a more complex way) to assign values to properties:
I know this particular case is possible with something like this
but for more complex cases the first option is needed.
My second issue is when trying to declare a js-object like this:
it is not giving an error but when having more then one entry
I get this error:
"a": "b",
^-- Expected string or identifier as object key
Am I doing anything wrong or are both cases not really implemented yet?
The text was updated successfully, but these errors were encountered: