Maybe fix the DelegateModel + ListView.add bug

This commit is contained in:
miruka
2020-05-01 02:12:58 -04:00
parent bf20b7864d
commit c352275089
4 changed files with 43 additions and 25 deletions

View File

@@ -12,12 +12,25 @@ HColumnLayout {
HListView {
id: memberList
clip: true
add: null // See the XXX comment in HListView.qml
model: HStringFilterModel {
sourceModel: ModelStore.get(chat.userId, chat.roomId, "members")
field: "display_name"
filter: filterField.text
delegate: MemberDelegate { width: memberList.width }
delegate: MemberDelegate {
id: member
width: memberList.width
ListView.onAdd: ParallelAnimation {
HNumberAnimation {
target: member; property: "opacity"; from: 0; to: 1;
}
HNumberAnimation {
target: member; property: "scale"; from: 0; to: 1;
}
}
}
}
Layout.fillWidth: true