[PyQt] About keyPressEvent

"Gustavo A. Dí­az" gustavo.diaz at gmail.com
Thu Aug 23 04:10:21 BST 2007

But this method is applied when you have a Menu bar right? Which i do
NOT use.

I just want the key combination Alt+Esc to hide my app.....

Examples please?


Sundance escribió:
> Gustavo A. Dí­az wrote:
>> As i said, only Escape key.
>> I want to know to do the same but with alt + Escape....... or which
>> is the way to do it...
> Hi Gustavo,
> I am not sure I understand what it is that gives you trouble here. Is it 
> that you don't know how to go about it, or is it that it doesn't work 
> properly for you?
> In case it's the former, you will probably want to wrap the window 
> hiding code under a QAction, and give that QAction the 
> shortcut 'Alt+Esc' with QAction.setShortcut().
> Remember that a QAction must be added to a widget (with 
> QWidget.addAction()) before its shortcut will work.
> With kind regards,
> -- S.
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt

/Gustavo A. Díaz/
*GDNet Projects*
www.gdnet.com.ar <http://www.gdnet.com.ar>
Gustavo A. Díaz
-------------- next part --------------
Skipped content of type multipart/related

More information about the PyQt mailing list