I\'m trying to implement QAbstractItemModel for QTreeView. I have problem with inserting rows. I noticed that if I insert at the beginning of my application all works fine.
Just a quick guess, the QT Doc for QAbstractItemModel says...
The model emits signals to indicate changes. For example, dataChanged() is emitted whenever items of data made available by the model are changed. Changes to the headers supplied by the model cause headerDataChanged() to be emitted. If the structure of the underlying data changes, the model can emit *layoutChanged() to indicate to any attached views that they should redisplay any items shown, taking the new structure into account*.
So i guess, you need to emit layoutChanged() signal from your model (whenever you change the data in model) in order to update connected views.
Also read the QT docs for model view architecture, how it is implemented in QT
see if that helps, if it doesn't i will try to download your code and debug it and see, what's wrong. Good Luck