AListView可以分为sections,也称为组。该文档在这里提供了一个很好的示例。
基本上,您定义 a Component,就像定义Header和一样Footer,并将其设置在section.delegate子属性中。在代码中:
ListView {
id: view
[...]
section.property: "size" // <--- the splitting property name
section.criteria: ViewSection.FullString // <--- specify the way section is created (see the provided link)
section.delegate: sectionDelegate // <--- your delegate
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5165 次 |
| 最近记录: |