Getting keyboard events with pyqt

i recently converted from wxpython to pyqt and im still facing a lot of problems since im is still noob in pyqt

so is it possible to detect if the user pressed (CTRL + key) in pyqt? And How?



I tried to find an answer for this for 3 days. if you know a site or a good place to learn pyqt, it will be much appreciated

thanx in advance

+3
source share
2 answers

Add a QShortcut and listen to its activated () signal, then perform the action in the slot.

QWidget keyPressEvent, . () (), , , . , QWidget .

+7

- , , - , , ( ). - , , , .

!

P.S. QAction, Ctrl + X , menu ... / . FYI.

+2

Source: https://habr.com/ru/post/1743897/


All Articles