QML 레이아웃 구성 요소에서 시작 및 끝 여백을 제거 할 수있는 방법이 있습니까?QtQuick 레이아웃 여백
다음은 몇 개의 하위가있는 ColumnLayout의 예입니다. 문제는 상위 및 하위 여백을 제거하고 상위 레이아웃의 전체 높이를 따라 모든 하위를 재배포하는 방법입니다.
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']
}
}
}
}
좋아, 적어도 우리가 당신을 도울 수 있도록 코드를 제시해야합니다. – folibis
@folibis my bad. 코드가 첨부되어 있습니다. –
코드가 불완전하므로 해결 방법 만 가정 할 수 있습니다.'Layout.alignment : Qt.AlignTop'을'activeDot_container' 아이템 – folibis