title: Sorting QTableWidget Items Numerically
body: <p>Using QTableWidget within PyQt4 when sorting is enabled, the items are sorted as strings.</p>
  
  <p>variable = [1,2,3,4,5,11,22,33]</p>
  
  <p>produces order</p>
  
  <p>1
  11
  2
  22
  3
  33
  4
  5</p>
  
  <p>I am currently using the code below to fill the table</p>
  
  <pre><code>tableWidgetData.setItem(0, 0, QtGui.QTableWidgetItem(variable))
  </code></pre>
  
  <p>I have tried as I thought the variables are only sorted as string because they are strings</p>
  
  <pre><code>tableWidgetData.setItem(0, 0, QtGui.QTableWidgetItem(int(variable)))
  </code></pre>
  
  <p>But this wasn't possible. Where am I going wrong here?</p>