[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Catch a F key press in a QLineEdit
From:       michael h <michaelkenth () gmail ! com>
Date:       2018-11-18 23:23:28
Message-ID: CAD0nt=GbqMQWyJBKWsnOLh69TXxMhuLW5r=Cbszeg2LEKYVq1Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> but didn't find a way of get it from a widget other than the main widget.
>
> Thank you in advance.
> Regards,
> Jorge
>
>
You can implement this on a QLineEdit as well:
http://doc.qt.io/qt-5/qlineedit.html#keyPressEvent

(alternatively if you aren't able to use your own QLineEdit subclass, you
can probably get it done with an event filter where you check if the source
is a QLineEdit, but I wouldn't start there)

mh

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br>but didn&#39;t find a way \
of get it from a widget other than the main widget.</div><div><br></div><div>Thank \
you in advance.</div><div>Regards,</div><div>Jorge<br></div></div><br></blockquote><div><br></div><div>You \
can implement this on a QLineEdit as well: <a \
href="http://doc.qt.io/qt-5/qlineedit.html#keyPressEvent">http://doc.qt.io/qt-5/qlineedit.html#keyPressEvent</a> \
</div><div><br></div><div>(alternatively if you aren&#39;t able to use your own \
QLineEdit subclass, you can probably get it done with an event filter where you check \
if the source is a QLineEdit, but I wouldn&#39;t start \
there)</div><div><br></div><div>mh</div></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic