I know there is the possibility of setting the parent model index for the item view, but I'd like to do this for the model.
The reason is quite simple, I want to get rid of those constructs:
# PyQt 4.5.4, but this should be similar to Qt.
def insertRows(self, row, count, parent=QModelIndex()):
if parent.isValid():
parentNode = parent.internalPointer()
else:
parentNode = self.rootNode