I cannot find information about the exact execution order of QML property bindings and property change signals.
For instance I have a property like:
property int myProp: 1000
Then I have another property bound to it:
property int myProp2: myProp
And I have property change signal handlers:
onMyPropChanged: console.log("myProp changed: ", myProp, " myProp2: ", myProp2)
onMyProp2Changed: console.log("myProp2 changed: ", myProp2, " myProp: ", myProp)
If I set myProp to 2 for e.g. the output is:
qml: myProp changed: 2 myProp2: 1000
qml: myProp2 changed: 2 myProp: 2
I don't know if it is a rule that the property change signal runs first then the dependent properties are going to be updated next, or their execution order is not defined at all. What happens if I have more dependent properties, is their re-evaluation order defined?
Then finally what about cross dependencies like:
property int myProp3: myProp2 + myProp
property int myProp2: myProp
property int myProp: 1000
onMyPropChanged: console.log("myProp changed: ", myProp, " myProp2: ", myProp2, " myProp3: ", myProp3)
onMyProp2Changed: console.log("myProp2 changed: ", myProp2, " myProp: ", myProp, " myProp3: ", myProp3)
onMyProp3Changed: console.log("myProp3 changed: ", myProp3, " myProp: ", myProp, " myProp2: ", myProp2)
On my machine the output is:
qml: myProp changed: 2 myProp2: 1000 myProp3: 2000
qml: myProp2 changed: 2 myProp: 2 myProp3: 2000
qml: myProp3 changed: 4 myProp: 2 myProp2: 2