-
Bug
-
Resolution: Done
-
P2: Important
-
3.x
-
None
If you try the following QML example, clicking the red rectangle doesn't increase the size of an array while the green one does. Both should.
import Qt 4.6 Rectangle { width: 640 height: 480 id: rect property var array: new Array Rectangle { height: 50 width: 50 color: "red" MouseRegion { anchors.fill: parent onClicked: { print("before append, size is" + rect.array.length); rect.array[rect.length] = null; print("after append, size is" + rect.array.length); //should be 1 more } } } Rectangle { x: 60 height: 50 width: 50 color: "green" MouseRegion { anchors.fill: parent onClicked: { print("before append, size is" + rect.array.length); var arr = rect.array; arr[arr.length] = null; rect.array = arr; print("after append, size is" + rect.array.length); //should be 1 more } } } }