[Qt-interest] Qt 4.5: What is the correct way of notifying a proxy model of removed rows of its source model?
Tilmann Krüger
Tilmann.Krueger at inpho.de
Tue Sep 7 15:33:14 CEST 2010
Hello everybody,
one would think that QAbstractProxyModel takes care of this all by itself.
A closer look in the source code reveals that this is not the case.
My guess is to implement slots for the rowsAboutToBeRemoved() and
rowsRemoved() signals of the source model, which call beginRemoveRows() and
endRemoveRows() with the correct rows for the proxy.
This, however, raises the question of how one is supposed to get the corresponding
set of row numbers of the proxy model, which - to make things even more complicated
- is not necessarily contiguous as the region in the source model.
I hope that my problem is clear by what I wrote.
Any help is appreciated, including pointers to documentation I may have missed!
Thank you in advance!
Regards,
Tilmann
More information about the Qt-interest-old
mailing list