[PyQt] QLineEdit drop event

"Sybren A. Stüvel" sybren at stuvel.eu
Wed Apr 28 13:32:51 BST 2010

On 28-4-2010 14:04, Sebastian Elsner wrote:
> Documentation suggests that I subclass the line edit and reimplement
> the dropEvent.

That sounds good to me.

> Would not be a problem, but my Line edit widget already exists on the
> dialog, so how to subclass without creating a completely new
> instance? Or is there another way I don't see?

You can register your subclass in the designer, and tell it to replace
the QLineEdit instances with your subclass. In the field that would
ordinarily hold the .h file that defines the subclass, enter the .py
file instead.

Sybren A. Stüvel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100428/0aa31a00/attachment.pgp>

More information about the PyQt mailing list