QAbstractItemModel::beginMoveRows 2 times or how to implement swapping in DataModel?
Unsolved
General and Desktop
-
Hello. I have DataModel which inherits QAbstractItemModel with Tree data structure.
I have a methodQAbstractItemModel::moveRows
which swaps source and destination rows in case if they are one right after another (i.e. rows 5 and 6), butQAbstractItemModel::beginMoveRows
can process only one source row at a time. So in case with swapping I move 2 rows simultaneously. So, how can I make swap (moves) right way?
p.s. Details of my implementation does not allow to detach one move from another.