title: How to insert my database into my QTableWidget table?
body: <pre><code>class Table(QtGui.QDialog):
   def __init__(self, parent=None):
      super(Table, self).__init__(parent)
      layout = QtGui.QGridLayout() 
  
      self.table = QtGui.QTableWidget()
      self.table.setRowCount(20)
      self.table.setColumnCount(3)
      layout.addWidget(self.table)
  
      self.enterDataInTable()
  
      self.setLayout(layout)
  
   def enterDataInTable(self):  
      for row in range(0,20):
          for column in range(0,3):
              self.table.setItem(row, column, QtGui.QTableWidgetItem("cell %s-%s"%(row+1,column+1)))
  </code></pre>
  
  <p>This code produces a table with 20 rows and 3 columns, the data within each one informs me of its location. I want to instead have my database column and row titles, including the information inside them. This will be using sqlite 3. How would I be able to insert the database here and connect it appropriately?</p>