Okay first you are approaching this in the wrong manner... the data in a QTreeView or QTreeWidget should be stored within your code within a List or Dictionary and any and all manipulation you are doing to the data occurs to this in code List/Dictionary -- then whenever you want you simply update the QTreeView/QTreeWidget with your data.
Either that or you let them add a row to the QTreeView and edit its contents directly but either way the behind the scenes functionality is taking place within your List/Dictionary -- you are just implementing the Editing slightly differently is all.
Either that or you let them add a row to the QTreeView and edit its contents directly but either way the behind the scenes functionality is taking place within your List/Dictionary -- you are just implementing the Editing slightly differently is all.