Il 15/11/2016 23:15, Jason H ha scritto:
> Rectangle {
>       width: parent.width
>       height: childrenRect.height * 2
>       Text {
>               text: "title"
>               anchors.centerIn: parent
>       }
> }
> 
> 'QML Rectangle: Binding loop detected for property "height"'
> 
> I think that computation should be possible without creating a binding loop?

* The height of the Rectangle depends on the size + the position of the
children

* The position of the Text child depends on the size of the parent,
therefore it depends on the height of the parent

Hence you've got a binding loop.

HTH,
-- 
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to