【发布时间】:2018-02-22 13:27:49
【问题描述】:
是否可以在一个页面中显示多个列表视图?
我有 3 个单独的列表视图,我想将它们显示在一个页面上,但我正在努力布置它们。它们都相互重叠。
简单的布局示例:
ListView {
id: listOne
property string headertitle: "list one header"
spacing: 5
header: headerComponent
model: ListOneModel
}
ListView {
id: listTwo
property string headertitle: "list two header"
spacing: 5
header: headerComponent
model: ListTwoModel
}
ListView {
id: listThree
property string headertitle: "list three header"
spacing: 5
header: headerComponent
model: ListThreeModel
}
【问题讨论】:
-
是的,是可能的。如果您希望我们为您提供帮助,您必须提供minimal reproducible example,并指明您希望它们在页面上的放置方式。
-
您希望它们如何显示:全部在列中还是在一行中?
-
@eyllanesc 3 行,全宽,每行 1 个列表视图。
标签: qt qml qt5 qtquick2 qt-quick