I noticed in the source code of QAbstractItemView
that the method void startDrag(Qt::DropActions supportedActions)
calls some clearOrRemove()
private after a drag whose type is MoveAction()
, which removes selected items.
Point is, when the drop action occured in the same view, my models implements the action using moveRows()
, so the rows are moved and then clearOrRemove()
removes them as if they were the original rows.
How can I prevent this last removal? Did I miss the idiomatic way of implementing a move-only model (meaning that items can be moved but not added/removed)?