title: pyqt and table widget clear contents
body: <p>I am new to PYQT and I am trying to get a feel for it. I am trying to populate a table widget with 5 different push buttons. I need to clear out the table between each button push, but would like to leave the headers I have. I have tried a tablewidget clearcontents. but that clears everything and I am unsure of where to place it properly so it will clear the contents before each button push, that brings in the new info.</p>
  
  <pre><code>try:
      _fromUtf8 = QtCore.QString.fromUtf8
  except AttributeError:
      def _fromUtf8(s):
          return s
  
  try:
      _encoding = QtGui.QApplication.UnicodeUTF8
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig, _encoding)
  except AttributeError:
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig)
  
  class Ui_Form(object):
  
  
      def setupUi(self, Form):
          Form.setObjectName(_fromUtf8("Form"))
          Form.resize(761, 637)
          self.pushButton = QtGui.QPushButton(Form)
          self.pushButton.setGeometry(QtCore.QRect(0, 550, 201, 31))
          self.pushButton.setObjectName(_fromUtf8("pushButton"))
          self.pushButton.clicked.connect(self.get_output1_statement)
  
          self.pushButton_2 = QtGui.QPushButton(Form)
          self.pushButton_2.setGeometry(QtCore.QRect(0, 580, 201, 31))
          self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
          self.pushButton.clicked.connect(self.get_output2_statement)
  
          self.pushButton_3 = QtGui.QPushButton(Form)
          self.pushButton_3.setGeometry(QtCore.QRect(0, 610, 201, 31))
          self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
          self.pushButton_3.clicked.connect(self.get_output3_statement)
  
          self.pushButton_4 = QtGui.QPushButton(Form)
          self.pushButton_4.setGeometry(QtCore.QRect(250, 580, 201, 31))
          self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
          self.pushButton.clicked.connect(self.get_output4_statement)
  
          self.pushButton_5 = QtGui.QPushButton(Form)
          self.pushButton_5.setGeometry(QtCore.QRect(510, 580, 201, 31))
          self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
          self.pushButton.clicked.connect(self.get_output5_statement)
  
          self.tableWidget = QtGui.QTableWidget(Form)
          self.tableWidget.setGeometry(QtCore.QRect(0, 0, 741, 551))
          sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
          sizePolicy.setHorizontalStretch(5)
          sizePolicy.setVerticalStretch(5)
          sizePolicy.setHeightForWidth(self.tableWidget.sizePolicy().hasHeightForWidth())
          self.tableWidget.setSizePolicy(sizePolicy)
          self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
          self.tableWidget.setColumnCount(5)
          self.tableWidget.setRowCount(50)
          self.tableWidget.setItem(0,0,QtGui.QTableWidgetItem("name"))
          self.tableWidget.setItem(0,1,QtGui.QTableWidgetItem("column_1"))
          self.tableWidget.setItem(0,2,QtGui.QTableWidgetItem("column_2"))
          self.tableWidget.setItem(0,3,QtGui.QTableWidgetItem("column_3"))
          self.tableWidget.setItem(0,4,QtGui.QTableWidgetItem("column_4"))
  
  
          self.retranslateUi(Form)
          QtCore.QMetaObject.connectSlotsByName(Form)
  
      def retranslateUi(self, Form):
          Form.setWindowTitle(_translate("Form", "Form", None))
          self.pushButton.setText(_translate("Form", "button1", None))
          self.pushButton_2.setText(_translate("Form", "button2", None))
          self.pushButton_3.setText(_translate("Form", "button3", None))
          self.pushButton_4.setText(_translate("Form", "button4", None))
          self.pushButton_5.setText(_translate("Form", "button5", None))
  </code></pre>