[Interest] Quick2 - animate sorting of listview, sorted with QSortFilerProxyModel

Ola Røer Thorsen ola at silentwings.no
Wed Aug 14 10:34:32 CEST 2013


I'd like to animate the sorting of a live scoreboard, using Quick2 and 
c++. It's for covering a live sports racing event, but the same would 
apply if you imagine you have to create the score board for the voting 
segment of the Eurovision Song Contest or something.

My data model is based on QAbstractListModel, and I sort it using the 
QSortFilterProxyModel. Finally it's displayed in a Quick2 ListView.

I think I might have hit a severe limitation in ListView or something, 
it does not seem to grasp the re-ordering of elements in the list, it 
just thinks the contents of each entry changed instead. So the item on 
the top of the list always has index 0, etc. This prevents animation of 
re-ordering, only animation of adding/removing elements on the end of 
the list is possible.

Same issue occurs when filtering a list, it's not the items filtered out 
that really disappear from the list, it's just the ones that happen to 
be on the bottom.

Anyone know how to animate the sorting of a ListView? (hopefully without 
Javascript hacks...)

Thanks!





More information about the Interest mailing list