I would like to display AppListView with separators of custom delegates. Separators should have 2 properties - color defined as string and text also defined as a string - both coming from my model as roles and they always come in pairs so for example
- if color is
#b3b3b3
text is alwaysAA
, - if color is
#eeeeee
text is alwaysBB
.
I cannot find any option to pass two arguments to my section, so I can make both color and text to be displayed on my separator.
For those who prefer code:
AppListView {
id: list
section {
property: "separatorTextRole" /* here I set my first role to be separator property */
criteria: ViewSection.FullString
delegate: CustomSeparatorDelegate {
itemColor: /* how can I pass also my separatorColorRole here? */
itemText: section /* here I access my separatorTextRole */
}
}
delegate: CustomListDelegate {
text: nameRole
row: rowRole
value: valueRole
}
}