Yes, this is what I have done already. But the thing is, that it will copy the row several times and not just move it. How do I turn this off, then?
Yes, this is what I have done already. But the thing is, that it will copy the row several times and not just move it. How do I turn this off, then?
Hmm. Ok, I have found a way to avoid the duplication. In my model, I added:
Qt Code:
row, 0, parent); }To copy to clipboard, switch view to plain text mode
Doesn’t look to smart to me, but it keeps the rows ‘aligned’ when dragging and dropping.
It basically depends on the drop action you perform. If the action is DropMove, you should remove the old item after the drop.
Bookmarks