[Interest] Re-ordering items in QListWidget by drag-and-drop
Stephen Chu
stephen at ju-ju.com
Mon Oct 1 16:12:03 CEST 2012
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:
m_inkList->setSelectionMode(QAbstractItemView::SingleSelection);
m_inkList->setMovement(QListView::Free);
m_inkList->setDragEnabled(true);
m_inkList->viewport()->setAcceptDrops(true);
m_inkList->setDropIndicatorShown(true);
m_inkList->setDragDropMode(QAbstractItemView::InternalMove);
I forgot to mention this is Qt 5. On Mac there's no visual hint on
anything being selected or movable. On Windows, I can see selection of
one item but still not movable.
More information about the Interest
mailing list