I'm trying to use the ListView in QML that displays some data provided by C++ model (based on QAbstractListModel). When I remove the item from model I'd like to animate this action, and I'm using onRemove slot of the ListView. Problem is that the animation has very strange behavior, to be precise:
- items are grouped visually with section.* properties
- if I try to delete the first item that immediately follows header of the group, then the header is duplicated bellow the deleted item during the animation
- if I delete items from the group that do not follow header immediately, then animation looks OK.
- if there is only one item in the group then the animation goes also fine.
- if I disable the animation (comment onRemove), then the first item after the header does not removed totally, I mean, it is removed from model, but not from the ListView, leaving the black area.
I'm using block of beginRemoveRows/endRemoveRows during removal of the item. Emiting signal dataChanged doesn't help as well. What am I doing wrong? Thank you in advance