[PyQt] Catching events

Frédéric frederic.mantegazza at gbiloba.org
Fri Jan 16 22:54:24 GMT 2009

Ok, I'm looking for 2 things:

1) catching key events

I found that I have to implement the keyPressEvent() method. I did this in 
the mainWindow, but the behaviour depend where is the focus. And as I want 
to catch arrow keys, it also change the focus! What is the proper way to 
do this? I also want to rebind key TAB, to avoid changing the focus, 
space, and enter...

2) catching the close window event (when clicking in the little x, in the 
up-right corner)

What is, and how to catch, this event?




More information about the PyQt mailing list