On Thursday 18 October 2007, Gustavo A. Díaz wrote:
> Hi!
>
> What i want to do this time, is to disable a key event in my app. For
> example i want to avoid closing the app by pressing ALT + F4:
>
> def keyPressEvent(self, event):
> if event.key() == QtCore.Qt.Key_F4 and (event.modifiers() &
> QtCore.Qt.AltModifier):
> # DO Nothing. How?
pass
I believe :)
The rest, you can let the source class handle them:
else:
QMainWindow.keyPressEvent(self, event)
(or whatever the class is you're inheriting right now)
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
