the thing is that if you use setData() it is meant that you set data to the existing index. How are editing value node if there is no such node? I don't understand it, because you want to edit not existing index in your model which will make this model to insert this index...
Then my advice is to insert a new node (index) with insertRow() and then edit its value.
Bookmarks