【发布时间】:2021-05-23 19:43:05
【问题描述】:
鉴于此 QML:
ApplicationWindow {
id: window
width: 640
height: 480
visible: true
color: "black"
ListView {
id: myView
anchors.fill: parent
model: [12, 12, 12, 12, 12, 12, 12, 12]
delegate: ItemDelegate {
width: parent.width
contentItem: Rectangle {
color: "blue"
}
}
spacing: 0
}
}
列表视图或单个行将在它们周围呈现间距:
我怎样才能去掉这个间距?我需要的是相对于 ApplicationWindow 的列表视图周围没有边框,并且列表视图行之间的间距为 1px。
【问题讨论】:
标签: qt listview qml qtquick2 spacing