Creating a small derived class and a new instance of it isn't that much of an effort in Python, given you only need to reimplement the dropEvent method. I don't think there are other solutions, based upon the doc's suggestion..<div>
<br></div><div>Although I must say that I've came across some code here on the list some time ago that showed how to capture click events on a QLabel without subclassing it, so you might want to search for that snippet, since it's basically the same combination of items (event on a QWidget)..<br>
<div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Apr 28, 2010 at 2:04 PM, Sebastian Elsner <span dir="ltr"><<a href="mailto:sebastianelsner@freenet.de">sebastianelsner@freenet.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
I designed a GUI with Qt Designer. The GUI has several QLineEdits. I'd like to be able to drop files from the windows explorer to this line edits and display the path of the files. Documentation suggests that I subclass the line edit and reimplement the dropEvent. 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?<br>
<br>
Thank you for any suggestions<br>
<br>
Regards<br>
<br>
Sebastian<br><font color="#888888">
<br>
<br>
<br>
<br>
-- <br>
Using Opera's revolutionary e-mail client: <a href="http://www.opera.com/mail/" target="_blank">http://www.opera.com/mail/</a><br>
_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Nick Gaens<br>
</div></div>