Hi, I've encountered the same error twice. I solved it the first time but not the second.
For the first error, I used in some loops invalid indexes as ending conditions, but proxy model does not seems to appreciate access to invalid indexes (out of range) whereas in my custom model, out-of-range index requests return invalid indexes. So I rewrite my loops to avoid out-of-range index request.
For the second error, I've not found any solution yet. It seems that proxy model maintains persistent indexes. Thoses indexes are modified by the QTreeView when expanding. But when the QSortFilterProxyModel tries to access thoses indexes, they seems to be invalid. I don't understand why thoses indexes are invalid, since they are set by the QTreeView.
Edit:
I've found a workaround for my case. I disconnect the signal between modelReset() and reset() in my derived class constructor of QSortFilterProxyModel and it seems to work. But I only have to fully expand/collapse the tree, maybe there's more to do in your case.
Bookmarks