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

childrenRect.height is incorrect if child reduces in size

$
0
0
my experience is that childrenRect sometimes doesn’t work at all or is always 0 (I use QtQuick 2) for whatever reasons, might be a feature or bug I don’t know. Especially if you have some weird anchors and property bindings the Item can be expanded and not collapsed again that is always due to circular bindings I think (the QML engine doesn’t always show the warning for that, only for obvious cases) Anyway in your case you can just calculate the “childrenRect” yourself if you only have a few items, and don’t rely on that property, sometimes that works better if you know the layout of you items it should be easy for a few items to sum up the sizes or whatever depending on your layout.

Viewing all articles
Browse latest Browse all 4972

Trending Articles