-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
6.9.2
-
None
According to Binding QML Type the Binding Type should restore a property to its original binding as soon as the when condition is false.
This does not to be the case at all and can be reproduced in the following example.
I expect the left Rectangle to switch its color from blue to transparent once every second. But it only switches to blue once.
import QtQuick Window { id: root property bool isRectBlue: false width: 640 height: 480 visible: true title: qsTr("Hello World") Timer { interval: 1000 repeat: true running: true onTriggered: function () { root.isRectBlue = !root.isRectBlue } } Rectangle { anchors { top: parent.top left: parent.left right: parent.horizontalCenter bottom: parent.bottom } Binding on color { when: root.isRectBlue value: "blue" } } Rectangle { anchors { top: parent.top left: parent.horizontalCenter right: parent.right bottom: parent.bottom } color: root.isRectBlue ? "blue" : "transparent" } }
The full compiling example is appended.