QMLレイアウトコンポーネントの開始マージンと終了マージンを削除する方法はありますか?QtQuickレイアウトマージン
ここに、2つの子を持つ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