I am using a QTableView, on which I set my own custom model, inheriting from QAbstractTableModel, using a call to QTableView::setModel().
The table view supports drag and drop: my model class reimplements mimeData() and dropMimeData(). Items can be dragged and dropped, even between 2 instances of the application.
What I'd like to achieve is: dropMimeData() should detect whether the dropped element comes from the same window, or from another window of another running copy of the application. And it should behave differently in each case.
Using the argument Qt::DropAction action of dropMimeData() seemed the most natural thing, but that does not work: it is always Qt::CopyAction or Qt::MoveAction, irrespective of the originating window, and only depending on the defaultDropAction of the QTableView.
Is this possible?