Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false)
-
drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false), setSelectionMode(xxx::SingleSelection).
in the ListMode, it works fine, howerver, in the IconMode, it seems i can drag the item, and Debug Error, ASSERT failure in QVariant::save: "Invalid type to save"
-
Hi,
Can you create a minimal compilable examples that shows this ?
-
sorry, no simple demo...just as i descide.
when i onverrider the drag&drop related func, it become OK, and not crash...
-
What were you dragging that made it crash ?
-
acctually as i said, i don't allow the ListItem to be dragget....but i don't know why when IconMode it seems can be dragged...
drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false)
drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false), setSelectionMode(xxx::SingleSelection).
in the ListMode, it works fine, howerver, in the IconMode, it seems i can drag the item, and Debug Error, ASSERT failure in QVariant::save: "Invalid type to save"