[Interest] Design Issue with QAbstractItemModel & QTreeView

john at wavemetrics.com john at wavemetrics.com
Fri Aug 5 17:47:11 CEST 2016


> When you say "packaging", you mean that you have a wrapper around the underlying data (something like a TreeItem class that "caches" data)?

I mean preparing the presentation of the data.

> Main issue is not on adding rows (this you can indeed call begin while data is already added), issue is on removal since beginRemoveRows needs to access to the to-be-removed row, which is an issue if row has already been removed

Why does removing a row require access to the (now gone) data?

I believe one the main things that the beginXXX and endXXX functions do is to tell the view that it should not update while you work on revising the model.

I'm not really sure how I got into being an "expert" on this. I'm not really :]

-John Weeks




More information about the Interest mailing list