title: Use QThread to periodically update a QTableWidget pyqt
body: <p>In my application, I'm fetching records using an API call and then I add the data to a QTableWidget dynamically. Here is a snippet of my code so far:</p>
  
  <pre><code>class TriageUI(QtGui.QMainWindow):
      def __init__(self):
          QtGui.QMainWindow.__init__(self)
          self.ui = Ui_TriageWindow()
          self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
          self.move(QtGui.QApplication.desktop().screen().rect().center()- self.rect().center())
          self.ui.setupUi(self)
          self.update_records()        
  
      def update_records(self):
          #items are the results from the API fetch
          items = json.loads(get_triage_queue(COOKIES, SERVER, PORT))
          rows = len(items['objects'])
          self.ui.tableWidget.setColumnCount(5)
          self.ui.tableWidget.setRowCount(rows)
          index = 0
          column = 0
          for j in items['objects']:
              for key, value in j.iteritems():
                  f = QtGui.QTableWidgetItem(str(value))
                  self.ui.tableWidget.setItem(index, column, QtGui.QTableWidgetItem(f))
                  column = column + 1
  </code></pre>
  
  <p>However, I want to be able to make the API call for data periodically(e.g after 15 seconds) and then add any new data items in the results to the table. How can I achieve this.</p>
  
  <p>Thank you in advance.</p>