title: Event - catch only Qt.Key_Delete
body: <p>I would like to change behavior of Key_Delete for QTableWidget, but because of using Designer I don't want to make any changes in py file with form. So instead of reimplementing QTableWidget like it is this answer: <a href="https://stackoverflow.com/questions/3539095/how-to-implement-mousepressevent-for-a-qt-designer-widget-in-pyqt">How to implement MousePressEvent for a Qt-Designer Widget in PyQt</a> I do something like this:</p>
  
  <pre><code>class MyForm(QtGui.QMainWindow):
  def __init__(self, parent=None):
      QtGui.QWidget.__init__(self, parent)
      self.ui = Ui_MainWindow()
      self.ui.setupUi(self)
  
      self.ui.tableWidget.__class__.keyPressEvent = self.test
  
  def test(self,event):
      if event.key() == Qt.Key_Delete:
          print "test"
  
      return QTableWidget.keyPressEvent(self, event)
  </code></pre>
  
  <p>The problem is that I don't know how to keep original behavior of other keys than Qt.Key_Delete.
  I have already changed last line like this:</p>
  
  <pre><code>return QtGui.QTableWidget.keyPressEvent(self, event)
  return QtGui.QTableWidget.event(self, event)
  </code></pre>
  
  <p>but it doesn't work.</p>