[PyQt] Dropping on ListView

Toralf Wittner wittner at fossilverlag.de
Thu Aug 30 13:38:49 CEST 2001


Boudewijn Rempt wrote:

> Well, first of all, it's really the QListView that should accept the
> drops, not the main widget - you can just as easily use a QListView as
> a main widget, so I moved the dropEvent code to the QListView.

Yes, you are right of course. I ripped this code fragment out of a larger 
project to make the problem clear and did not noticed that.

> 
> Then, the header takes up some space, too. You need to subtract the
> height of the header from the drop location. Below is some code that
> works (only because it rather messes about to generate drop events,
> it'll segfault nine times out of ten - never mind about that).

I see. Thank you!

Yours sincerely,
Toralf.



More information about the Python-list mailing list