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

Binding loop detected when initially parent height 0

$
0
0
Hi, this simple code generates “QML Rectangle: Binding loop detected for property “height”“ warning/error when clicked and Rectangle becomes visible. I really do not see that there is a binding loop. The warning/error is not printed if Rectangle initial property expanded is true, so this object has height at the beginning. Is this QML bug or there are some under the hood strange initializations, when size is 0 at beginning? Thank you Item {     width: 400     height: 400       Rectangle {         id: subOptionList           property bool expanded: false           height: expanded ? childrenRect.height : 0         clip: true         width: parent.width           Rectangle {             border.color: "red"             width: parent.width             height: 20         }     }       MouseArea {         anchors.fill: parent         onClicked: {             subOptionList.expanded = !subOptionList.expanded         }     } }

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images