QTableView drag drop support with row selection only
-
Hi everyone
I have a strange behavior with the table view... I allow row multiple selection and I try to use Drag & Drop to move items.
Everything works fine most of the time :) But sometime, when I try to do a drag drop by moving my mouse horizontally (accidentally) it block the drag drop operation and display an Ignore Action on windows... Is it an expected behavior ? -
Hi,
Do you mean that you are dragging over the row you just start dragging from ?
-
@SGaist :
Not specifically, as long as I start the drag drop by moving my mouse horizontally, I got an ignore action...Just dug a little deeper into Qt code, it's the COM call DoDragDrop that gave me the ignore action.
I just solved the problem, I was usingsetDragDropMode(QAbstractItemView::InternalMove);
. If I change tosetDragDropMode(QAbstractItemView::DragDrop);
I got a fully fonctionnal drag drop operation on rows, I don't know why though... -
Sounds a bit strange indeed… Running on Windows ?
-
@SGaist
Yes, just tried, don't have the problem on OSX... -
Might be a glitch on the windows low level stuff handling
-
@SGaist
Ok thanks, i'll report it