title: how can I clear a pyqt QTableWidget?
body: <p>I want to clear my QTableWidget. </p>
  
  <p>First of all I select a user in a qcombobox after that I click a qpushbutton and I populate it from database records; when I select other user and I click the qpushbutton to add data I try to clear with:</p>
  
  <pre><code>self.tableFriends.clear()
  </code></pre>
  
  <p>The data disappears but the rows remain.</p>
  
  <p>The code I populate with is:</p>
  
  <pre><code>def getFriends(self):
      id_us = self.cbUser.itemData(self.cbUser.currentIndex()).toPyObject()
      rowIndex = 0
      self.tableFriends.clear()
      for row in self.SELECT_FRIENDS(id_us):
          self.tableFriends.insertRow(rowIndex)
          for column in range(0,3):
              newItem = QtGui.QTableWidgetItem(str(row[column]).decode('utf-8'))
              self.tableFriends.setItem(rowIndex,column,newItem)
          rowIndex = rowIndex + 1
  </code></pre>