[PyKDE] PYKDE Drag and drop
Jim Bublitz
jbublitz at nwinternet.com
Sun Jun 18 00:03:28 BST 2000
Two questions/problems with DND:
(using PYKDE 0.11/Qt 1.44/KDE 1.2)
1. I'm creating a QDragObject in QListView.mouseMoveEvent.
Trapping all events in qApp, I only see an Event_DragResponse
generated, but never any Event_DragMove or similar events
(in addition to mouse and widget move events of course).
Also, to get the pixmap to move with the cursor, I have
to repeatedly do a QDragObject.setPixmap in the mouse
move event. When I release, the cursor isn't restored
and the pixmap remains where it's dropped. What am I
missing here?
2. (This may indicate my unfamiliarity with Python)
If I derive a widget, say from QListView, and want
to multiply inherit QDropSite, how do I do the
QDropSite init (it needs a pointer to the widget
to install the event filter)? I have:
class KFoo (QListView, QDropSite):
def __init__(self, parent):
QListView.__init__(self, parent)
Do I add:
QDropSite.__init__(self, self) ??
Also, it seems to make a difference if I do that
before or after the QListView call. Of course I
can't test this, because (see 1) I'm not getting
any events to test it with.
Thanks
Jim
More information about the PyQt
mailing list