|
Ah! Native Qt does not support non-contiguos drag and drop reordering with their built-in code.
A quote from a web search:
Qt's default drag-and-drop mechanism doesn't natively support moving disjoint selections. To reorder multiple non-contiguous items, subclass QAbstractItemModel and implement a custom MIME type. Override mimeData() to pack the disjoint indexes, and intercept the drop in dropMimeData() to calculate the shift, removing and re-inserting the items one by one.
So I am not sure supporting it makes much sense.
Last edited by KevinH; 07-22-2026 at 09:39 AM.
|