Is there any way to remove start and end margins in QML Layout components?
Here is an example of ColumnLayout with a couple of children. The question is how to remove those top and bottom margins and redistribute all children along full height of parent layout.
ColumnLayout {
    id: dotColumn
    anchors.horizontalCenter: bg.horizontalCenter
    height: root.height
    Repeater {
        id: repeater
        model: root.model
        Item {
            id: activeDot_container
            property int radius: 15
            width: radius * 2
            height: radius * 2
            Rectangle {
                anchors.centerIn: parent
                radius: parent.radius
                width: radius * 2
                height: radius * 2
                color: Palette.colors['deepPurple']['500']
            }
        }
    }
}

 
                        
After a couple of experiments with layout positioning I've come with following solution.
Assuming that margins I want to eliminate have size of a half of spacing between layout children, we can set negative margins to the beginning and the end of layout component, stretching it till first and last children align at start/end of layout.
Function I used to calculate margins:
Where
rootis a parent of Layout component,root.radius*2represents size of layout child item and can be replaced with another child dimension andmodel.lengthstands for children count.Then we can just set anchors for Layout component and set corresponding margins.
P.S. Same solution can be applied to RowLayout by replacing layout top/bottom anchors with left/right.