Function QListWidget::item(int) won't work too because inserted item is filled with data after sinal rowsInserted. When I take data when signal is emitted inserted item is empty(yes no data, just empty item).
I solved this problem but in some awful way. I created additional variables and when items are dragged and dropped first is emitted signal rowsInserted(I store a index as source of data), then item is added to list, next signal emitted id rowsRemoved(I add data now and remove unnecessary item). Awful isn't it? But it works!
UPDATE:
Well there is one drawback. When user hold CTRL when dragging(copy action) there is no rowsRemoved signal emitted
Well i will fix this problem someday :P
Bookmarks