title: Edit the cell's content of a QTableWidget in the code
body: <p>In my code, I've created a QTableWidget with 50 columns and 2 rows.
  By executing a function, Python put in cells list's elements that I've created before. But, I don't know how to modify these cells.
  For example, I want to get the current data of a cell at (x,y) and add an integer. So I've tried :</p>
  
  <pre><code>content = int(self.ui.table.item(X, Y).text()) #I've just strings in my cells
  self.ui.table.item(X, Y).setText(str(content + 1)
  </code></pre>
  
  <p>But that part of code, don't work.
  I've tried too : </p>
  
  <pre><code>a=self.ui.table.item(X,Y)
  print(a.data(0).toString())
  </code></pre>
  
  <p>But Python return me :</p>
  
  <pre><code>'NoneType' object has no attribute 'data'
  </code></pre>