Updated for QT5 to remove obsolete methods.
If you are using PyQT, all you need to do for your requirements is:
your_tableview.verticalHeader().setSectionsMovable(True) your_tableview.verticalHeader().setDragEnabled(True) your_tableview.verticalHeader().setDragDropMode(QAbstractItemView.InternalMove)
Then rinse and repeat with horizontalHeader top horizontalHeader if you want them to rearrange too.
You are absolutely right, you do not need to touch or even know which model for this functionality . This is also demonstrated by your correct use of the QSortFilterProxyModel decorator on the model itself.
The material that you saw about mimeTypes and all this is designed to drag and drop real objects from various sources from other windows / applications / desktop / etc. And not needed for what you are trying to accomplish at the moment.
source share