PDA

View Full Version : drag and drop from QTreeView



Untersander
10th April 2006, 08:48
I have a QTreeView initialized with

setDragEnabled(true);
setAcceptDrops(true);
setDropIndicatorShown(true);

then I use the startDrag, dragMoveEvent and dropEvent to handle the Items.

This works fine with Qt 4.0.1 but doesn't work anymore with the newer Qt versions:
startDrag is called but never dragMoveEvent.

I read in the forums that other people have the same problem, but they couldn't be helped.

wysota
10th April 2006, 09:00
then I use the startDrag, dragMoveEvent and dropEvent to handle the Items.

You shouldn't need (and shouldn't use) any of those with QTreeView. You should use the model-view based approach for model-aware widgets.