code: def keyPressEvent(self, event):
          
          if event.key() in [Qt.Key_Enter, Qt.Key_Return]:
              QTableWidget.keyPressEvent(self, event)
              # To avoid having to enter one final tab
              self.setDisabled(True)
              self.setDisabled(False)
              self._parent.keyPressEvent(event)
          else:
              QTableWidget.keyPressEvent(self, event)
docs: Qt override.