[PyQt] Target Item in dropEvent

Kurt Barlow kurt.barlow at gmail.com
Tue Aug 4 20:51:28 BST 2009


Hi,

I have a QListWidget that I have configured to do what I need (Nice and
Easy). I add QListWidgetItems to it and specify with flags that these items
can accept drop events (QtCore.Qt.ItemIsDropEnabled).
I overwrite the drop event and make sure I let the QListWidget handle the
details ...

    def dropEvent(self, event):

        QtGui.QListWidget.dropEvent(self, event)
        # How can I get a reference to the target item from here?

The problem is that I need to know which row the item that is being dropped
onto is in (target item). QListWidgetItem has no events for me to overwrite
so subclassing it did not help me. Any ideas?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090804/ff5dd9a4/attachment.html


More information about the PyQt mailing list