Ejemplo n.º 1
0
 def keypress(self, e):
     if e.key() == Qt.Key_Delete:
         ind = self.viewer.selectedIndexes()[0].row()
         self.delete(ind)
     else:
         QTableWidget.keyPressEvent(self.viewer, e)
Ejemplo n.º 2
0
 def keyPressEvent(self, e):
     if self.keypress is not None:
         self.keypress(e)
     else:
         QTableWidget.keyPressEvent(self, e)