title: How to change the font size of QTableWidget header?
body: <p>I am trying to decrease the size of the font in horizontal header of a QTableWidget. Below code does not work, font size remains unchanged.</p>
  
  <pre><code>QFont font;
  font.setPointSize(7);
  ui.tableWidget-&gt;horizontalHeader()-&gt;setFont(font);
  </code></pre>
  
  <p>How can I change the font in this case?</p>