According to QML documentation Item must contain childrenRect object with properties (x,y,width,height). It's very useful and used frequently with ListView and Repeater. http://doc.qt.io/qt-5/qml-qtquick-item.html#childrenRect-prop Reproducible: Always Actual Results: No property childrenRecct
It works fine but I don't know how to update internally read only property yet. Here are my changes: 1) function computing the Rect function updateChildrenRect(component){ var children = component !== undefined ? component.children : undefined if ( children == undefined || children.length == 0 ) return; var maxWidth = 0; var maxHeight = 0; var minX = children.length>0 ? children[0].x : 0; var minY = children.length>0 ? children[0].y : 0; var h=0; var w=0; for(var i in children){ var child = children[i]; h = child.$isUsingImplicitHeight !== 0 ? child.implicitHeight : child.height; w = child.$isUsingImplicitWidth !== 0 ? child.implicitWidth : child.width; maxWidth = Math.max(maxWidth, child.x + w); maxHeight = Math.max(maxHeight, child.y + h); minX = Math.min(minX, child.x); minY = Math.min(minX, child.y); } component.childrenRect.x = minX; component.childrenRect.y = minY; component.childrenRect.width = maxWidth; component.childrenRect.height = maxHeight; } 2) above to be called from updateVGeometry and updateHGeometry if (this.parent != undefined) updateChildrenRect(this.parent); 3) and a childrenRect property for QMLItem this.childrenRect = new QObject(this); createSimpleProperty("real", this.childrenRect, "x","rw"); //todo ro createSimpleProperty("real", this.childrenRect, "y","rw"); // todo ro createSimpleProperty("real", this.childrenRect, "width","rw"); // todo ro createSimpleProperty("real", this.childrenRect, "height","rw"); // todo ro
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.