[Interest] Re-ordering items in QListWidget by drag-and-drop
tony at rightsoft.com.au
Mon Oct 1 16:55:56 CEST 2012
> Sent: Tuesday, 2 October 2012 12:12 AM
> On 10/1/12 9:55 AM, R. Reucher wrote:
> > On Monday 01 October 2012 15:54:30 R. Reucher wrote:
> >>> What else should I set so I can reorder items? Or does QListWidget
> >>> not support it?
> >> You have set the dragDropMode property to InterMove!
> > Correction: the property's value is 'InternalMove'.
> That doesn't work. This how I setup the widget:
> I forgot to mention this is Qt 5. On Mac there's no visual hint on
> being selected or movable. On Windows, I can see selection of one item but
> still not movable.
I think you also need to use QListWidgetItem::flags Qt::ItemIsDragEnabled.
I'm not sure about the Qt::ItemIsDropEnabled flag for internal moves.
More information about the Interest