【发布时间】:2018-01-20 20:36:00
【问题描述】:
我遇到了 ListView 的问题。 ListView 太长,其中一部分出现在窗口之外,但我无法附加滚动条。我尝试了许多不同的组合。我认为问题出在高度参数上,但如果删除它 ListView 只显示第一个条目。
Column{
anchors.fill: parent
Row{
id: buttonsRow
Button{
text: "Open dump file"
onClicked: fileDialog.visible = true
}
Button{
text: "Copy raw data to clipboard"
}
}
ListView{
id: listView
anchors.top: buttonsRow.bottom
height: contentHeight
//clip: true
flickableDirection: Flickable.VerticalFlick
boundsBehavior: Flickable.StopAtBounds
interactive: true
model: ListModel{
id: listModel
}
delegate: MDelegate{}
}
}
有什么办法让它可以滚动吗?
【问题讨论】: