[PyQt] Catch a F key press in a QLineEdit
starglider.dev at gmail.com
Sun Nov 18 21:52:35 GMT 2018
I need to check if a function key F1, F2... F12 is pressed when the focus
is in a QLineEdit,
so far I can do that on the main widget overloading the keyPressEvent:
def keyPressEvent(self, e):
if e.key() == Qt.Key_F12:
but didn't find a way of get it from a widget other than the main widget.
Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt