title: How to display bold text in a specific QHeaderView section in combination with a stylesheet
body: <p>I'm using application-wide stylesheets to alter my QTableView's look. At the same time, I want certain column headers to have bold text, depending on the header text. For this I derived from <strong>QHeaderView</strong> and implemented the <strong>paintSection</strong> function:</p>
  
  <pre><code>class BoldHeaderView : public QHeaderView
  {
      Q_OBJECT
  
  public:
      BoldHeaderView( Qt::Orientation orientation, QWidget* parent = 0 ) : QHeaderView( orientation, parent ) { }
  
      void addBoldColumn( QString column_name )
      {
          if ( !m_bold_columns.contains( column_name ) )
              m_bold_columns.append( column_name );
      }
  
  protected:
      void paintSection( QPainter* p_painter, const QRect&amp; rect, int logicalIndex ) const
      {
          QFont bold_font = p_painter-&gt;font();
          QString column_name = model()-&gt;headerData( logicalIndex, Qt::Horizontal, Qt::DisplayRole ).toString();
  
          if ( m_bold_columns.contains( column_name ) )
              bold_font.setBold( true );
  
          p_painter-&gt;setFont( bold_font );
  
          QHeaderView::paintSection( p_painter, rect, logicalIndex );
      }
  
  private:
      QList&lt;QString&gt; m_bold_columns;
  };
  </code></pre>
  
  <p>Then I set this as the QTableView's horizontalHeader :</p>
  
  <pre><code>BoldHeaderView* p_bold_header = new BoldHeaderView( Qt::Horizontal );
  p_bold_header-&gt;addBoldColumn( "Foo" );
  
  m_p_table_view-&gt;setHorizontalHeader( p_bold_header );
  </code></pre>
  
  <p>My stylesheet looks like this:</p>
  
  <pre><code>QTableView QHeaderView::section {
      font-family: "Segoe UI";
      background-color: white;
      border-style: none;
  }
  </code></pre>
  
  <p>And it is applied application-wide in the main-function:</p>
  
  <pre><code>QApplication app(argc, argv);
  [...]
  app.setStyleSheet( style_sheet );
  </code></pre>
  
  <p>Thanks to <em>eyllanesc</em> I found out that this conflicts with the stylesheet. The bold font will always be overwritten with whatever is specified there. I need to find a way to combine both methods.</p>