def keyPressEvent(self, event):
        """Reimplement Qt method"""
        if event == QKeySequence.Copy:
            self.copy()
        else:
            QTableView.keyPressEvent(self, event)
def keyPressEvent ( self , event ) : if event == QKeySequence . Copy : self . copy ( ) else : QTableView . keyPressEvent ( self , event )
Reimplement Qt method