I'm working on a stand alone example which removes all database, etc and doesn't expose anything requiring a wink and a nod to a blind man to know.
What is getting lost in translation here is the "book" concept. An entire book has to fall off, not just a few pages.
The model has to keep track of which database IDs (hmm Dewey Decimal Numbers actually work well for this). What is set is the number of database IDs we allow the model to utilize at any given time. The number of rows is, however, many it needs to be. Each database ID could be dozens or hundreds of rows in the table. When an ID gets shoved out of the list all of the rows for that ID get nuked from the model. There is no realistic method of retrieving and reconstructing part of a book, has to be the entire thing, you don't get to rip the first chapter out and stuff it back in when you are done.
It's not of my choosing, it simply is what it is.
Btw, after others punted on this and it was handed to me I changed the model to be based on QAbstractTableModel which may not have been the wisest choice.
Now that I'm typing this and thinking about it, what I really need is a model of a model. One model containing database IDs which feeds/communicates with the next model which does the expansion and removal.
Bookmarks