pyqt: Trying to understand insertrows for QAbstractDataModel and QTreeView
I am using PyQt to manage a tree view using a QAbstractItemModel. So far I have successfully implemented it such that I can load the data, expand and collapse it, and edit values. One thing I am not able to do, however, is wrap my head around inserting and removing rows. Short version of what I am trying to do: When the user edits a particular cell, I need to actually delete the underlying item in my object hierarchy and replace it with a different one. I implement this in the setData method of my model. Since I don't completely understand what I am doing I seem to have set it up so that it