PDA

View Full Version : QTableWidget, dropping between the rows shall insert the item



lotek
15th October 2010, 22:07
Hi all,

I have an opposite problem to the one described by sergiomar73 in the thread "QtableWidget that don't accept drop item between rows?"

I'd like to INSERT the dragged row of the QTableWidget BETWEEN two other rows. The drag and drop works OK, the insertion is possible only between the rows, but item disappears instead of to be inserted.
Optimally, the gap after the moved item shall be closed ( according part of the rows shall be moved)

any idea how to to do this?

great thanks for any help

lotek
16th October 2010, 00:12
Hi,

I've found out that in the QTableView, the feature works correctly. The problem is only with the QTableWidget. Is this a bug or a feature ???

regards

neuronet
7th October 2014, 03:18
I am having the same problem. It works fine in QListWidget, but in QTableWidget it drags content from row i, drops onto row j, overwriting the content in row j, and row i is now blank

neuronet
8th October 2014, 16:38
I just posted about this at Stack Overflow too, just to see if there is something obvious I am missing:
http://stackoverflow.com/questions/26227885/drag-and-drop-rows-within-qtablewidget

neuronet
11th October 2014, 14:21
Someone at Stack Overflow answered. It's tricky, but doable:
http://stackoverflow.com/a/26311179/1886357

For a noob like me it is actually a beautiful example to work through.