[PyKDE] Make '/keyPressEvent' listening?

Johannes Graumann johannes_graumann at web.de
Wed Oct 11 11:21:28 BST 2006


Hello again,

This pyqt4 documentation is driving me crazy ... took me forever to get the 'ctrl_q' part right, but now I fail to figure out how to make my 'self.maindialog' actually listening to it ... preciously few examples for this on the web, so learning turns out to be hard work.

Thanks for your help.

Joh

from PyQt4 import QtGui, QtCore
ctrl_q = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,QtCore.Qt.Key_Q,QtCore.Qt.ControlModifier)
if self.maindialog.keyPressEvent(ctrl_q):
  _slot_Quit_Ctrl_Q
_______________________________________________________________________
Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos.
Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222




More information about the PyQt mailing list