title: How to control appearance of QTableWidget header
body: <p>How to change <code>QTableWidget</code> header's font and its content margin and spacing?
  I would like to make the font for "Column 0", "Column 1" smaller and have no spacing between the name of the columns and  the header edge.</p>
  
  <p><a href="https://i.stack.imgur.com/NHfpO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NHfpO.png" alt="enter image description here"></a> </p>
  
  <pre><code>from PyQt4 import QtCore, QtGui
  app = QtGui.QApplication([])
  
  columns = ['Column 0', 'Column 1', 'Column 2']
  items = [['Row%s Col%s'%(row,col) for col in range(len(columns))] for row in range(100)]
  
  view = QtGui.QTableWidget()
  view.setColumnCount(len(columns))
  view.setHorizontalHeaderLabels(columns)
  view.setRowCount(len(items))   
  for row, item in enumerate(items):
      for col, column_name in enumerate(item):
          item = QtGui.QTableWidgetItem("%s"%column_name)
          view.setItem(row, col, item)            
      view.setRowHeight(row, 16)
  
  view.show()
  app.exec_()
  </code></pre>