QTreeView internal drag'n'drop

I have custom subclasses of a QTreeView and a QAbstractItemModel. So far everything is working. What I would like to add is the option that the user can change the parent of an item in the tree view by dragging it around. I followed the corresponding documentation and extended my classes:

After those modifications I am able to drag an item around in the tree using the mouse. However, the changes are not applied. This is not surprising to me. However, the documentation mentions that the QAbstractItemModel provides sane implementations for the required drag(), drop() and mineData() methods so that implementing those is usually not necessary. It also mentions that the model must support removeRow() and all that stuff which is implemented in my model and works well for everything that is not related to drag'n'drop.

Can anybody tell me what else I need to do in order to be able to actually process the drag'n'droping?