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"


  • Lifetime Qt Champion

    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...


  • Lifetime Qt Champion

    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"


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.