title: How to save edited PyQt5 TableWidget cell?
body: <p>I have an Application which has a QTableWidget. When the user clicks a cell he can edit it, and can write anything. When he is finished he presses the 'enter' key to finish editing the cell.</p>
  <p>I want to get the new cell value right after the enter key and save it to a file with the keypress.</p>
  <pre><code>    #keyPressEvent
      self.tableWidget.keyPressEvent = self.KeyPressed
  
  def KeyPressed(self,event):
      if event.key() == Qt.Key_Return:
          row = self.tableWidget.currentRow()
          col = self.tableWidget.currentColumn()
          print(self.tableWidget.item(row, col).text())
  </code></pre>
  <p>This is the keypress code, but it gets the old value when the key pressed.</p>
  <p>Any solution for this, or any other way to save the edited cell to a file?</p>