I am trying to make Drag’n’drop work between 2 QListWidgets and actually do something with dropped data. For example. I have created such class:
class Task(QtGui.QListWidgetItem):
def __init__(self,text,itemid,parent=None,*args):
QtGui.QListWidgetItem.__init__(self, text,parent, *args)
self.itemid=itemid
And then… I want to access that itemid in dropEvent. Is that possible? Because the only thing I can access in dropEvent is mimeData but it’s not very usefull. I was trying to google it but with no success…
You could use QDropEvent:source() to get the widget which was dragged (IMHO your
Taskitem, but I don’t know python).