'Qt override.'

def keyPressEvent(self, event):

    if (event.key() in [Qt.Key_Enter, Qt.Key_Return]):
        QTableWidget.keyPressEvent(self, event)
        self.setDisabled(True)
        self.setDisabled(False)
        self._parent.keyPressEvent(event)
    else:
        QTableWidget.keyPressEvent(self, event)
