[PyQt] QLineEdit drop event
Nick Gaens
mail at nickgaens.com
Wed Apr 28 13:28:59 BST 2010
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..
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)..
On Wed, Apr 28, 2010 at 2:04 PM, Sebastian Elsner <
sebastianelsner at freenet.de> wrote:
> Hello,
>
> 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?
>
> Thank you for any suggestions
>
> Regards
>
> Sebastian
>
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
--
Nick Gaens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100428/b4f410de/attachment.html>
More information about the PyQt
mailing list