PDA

View Full Version : Drag/Drop on middle mouse button?



joeld42
21st August 2010, 00:20
I've got a QTreeView-derived class, and have set it up for drag and drop by calling setDragEnabled() and setAcceptDrops(), and that is working ok. The drag/drop is mostly for reordering stuff.

But now I enabled multiple selection, and it conflicts with drag/drop when trying to drag across a few items to select. In my app, selection is very common and drag/drop is relatively uncommon, so the users suggested putting the drag/drop on the middle mouse button.

What's the easiest or best way to do this?

Or has anyone out there found a better solution? Another idea was to put little bumpy "handles" on each item, and they would be draggable only from there. That would work as well, but seems a lot more complicated to implement.

thanks!
Joel