Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.0.0, 5.1.0 , 5.2.0, 5.3.0, 5.4.0 Beta
-
None
Description
Click the MouseArea at the top of the screen to switch between an anchor being assigned to a valid anchor and being assigned undefined. Clicking it will do nothing.
import QtQuick 2.0 Rectangle { width: 400 height: 400 visible: true Rectangle { id: rect x: 100 y: 100 width: 32 height: 32 color: "salmon" Text { id: textItem text: "32" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: checkBox.checked ? parent.bottom : undefined } } Text { text: "anchors.bottom = " + (checkBox.checked ? "parent.bottom" : "undefined") id: checkBox anchors.horizontalCenter: parent.horizontalCenter property bool checked: false MouseArea { anchors.fill: parent onClicked: parent.checked = !parent.checked } Rectangle { anchors.fill: parent color: "transparent" border.color: "red" } } }