I need to know how to set the ChildrenRect height and width for a grid element??
Grid {
id: grid1
anchors.fill: parent
rows: 10
columns: 10
childrenRect.height: background.height/10
childrenRect.width: background.width/10
}
it says its a read-only element that cannot be changed when i try to do this.
You can’t set them. The
childrenRectproperties are calculated from the item’s children. The only way to affect them is by setting the children’s dimensions. There’s no way to set them yourself.