title: Add combobox to horizontal header in QTableWidget
body: <p>I want to create a table in PyQt5 that has a combobox in each column header. When I try to do it, the following error is returned:</p>
  
  <p><code>TypeError: setHorizontalHeaderItem(self, int, QTableWidgetItem): argument 2 has unexpected type 'QComboBox'</code></p>
  
  <p>Apparently the function <code>setHorizontalHeaderItem()</code> doesn't accept widgets as items. So is there a way to achieve this? If not, I would settle with putting the comboboxes <em>above</em> the headers, but they should be aligned with the size of each column, even if the user changes the width with the mouse. I don't know if this is possible either.</p>
  
  <p>My code:</p>
  
  <pre><code>from PyQt5 import QtWidgets 
  import numpy as np
  
  class App(QtWidgets.QWidget):
      def __init__(self):
          super(App,self).__init__()
          self.data = np.random.rand(5,5)
          self.createTable()
          self.layout = QtWidgets.QVBoxLayout()
          self.layout.addWidget(self.table) 
          self.setLayout(self.layout) 
          self.showMaximized()
  
      def createTable(self):
          self.header = []
          self.table = QtWidgets.QTableWidget(len(self.data), len(self.data[0]))
          for i in range(len(self.data[0])):
              self.header.append(QtWidgets.QComboBox())
              self.header[-1].addItem('Variable')
              self.header[-1].addItem('Timestamp')
              self.table.setHorizontalHeaderItem(i,self.header[-1])
          for i in range(len(self.data)):
              for j in range(len(self.data[0])):
                  self.table.setItem(i,j,QtWidgets.QTableWidgetItem(str(self.data[i][j])))
  
  if __name__ == '__main__':
      app = QtWidgets.QApplication([])
      ex = App()
      app.exec_()
  </code></pre>