Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Enums not working or be referenced correctly in QML

$
0
0
QML ist mostly “just” JavaScript, and JS has dynamic objects. so the code is valid if you try something like this: var obj = {} // empty object console.log(obj.foo) obj.foo is valid code, it will just be undefined and that is why your code shows no warnings or error, you just try accessing a property that is not there and Qt will convert “undefined” to 0 if the target type in c++ is an int :)

Viewing all articles
Browse latest Browse all 4972

Trending Articles