[Interest] List widget and drag and drop

Michael Sué sue at sf.mpg.de
Mon Jul 13 16:31:49 CEST 2015


You can try to start the dragging with "drag->exec(Qt::CopyAction);" instead of "drag->exec();". The latter is a MoveAction by default which may be transformed into a CopyAction in InterProcess Drag-And-Drop..

- Michael.

From: interest-bounces+sue=sf.mpg.de at qt-project.org [mailto:interest-bounces+sue=sf.mpg.de at qt-project.org] On Behalf Of Graham Labdon
Sent: Monday, July 13, 2015 4:10 PM
To: Interest at qt-project.org
Subject: [Interest] List widget and drag and drop

I have a QListWidget that I need to support drag and drop
At the moment I have it so that I can drag an item from an different widget and have it added to the list

But when I drag an item internal to the widget the target of the drop seems to be deleted from the list

I need a list widget that supports both external drags and internal re ordering

Has anyone any idea of how to do this?


More information about the Interest mailing list