title: Sort Arrows Disappear When Subclassing QHeaderView
body: <p>I am subclassing QHeaderView to add a filtering icon in the horizontal header of a QTableView. The QTableView has sorting capability activated consume a QSortFilterProxyModel, until now it works fine.
  However when I try to subclass QHeaderView and use it as column header, only the first column shows the filter icon.</p>
  <p>headerview_filter.h</p>
  <pre><code>#ifndef HEADERVIEW_FILTER_H
  #define HEADERVIEW_FILTER_H
  
  #include &lt;QHeaderView&gt;
  
  class HeaderView_Filter : public QHeaderView
  {
  Q_OBJECT
  public:
     explicit HeaderView_Filter(Qt::Orientation orientation, QWidget * parent = nullptr);
     void paintSection(QPainter *painter, const QRect &amp;rect, int logicalIndex) const override;
  
  private:
     const QPolygonF _funel = QPolygonF({{22.0,36.0},{22.0,22.0},{10.0,10.0},{40.0,10.0},{28.0,22.0},{28.0,36.0}});
  };
  
  #endif // HEADERVIEW_FILTER_H
  </code></pre>
  <p>headerview_filter.cpp</p>
  <pre><code>#include &quot;headerview_filter.h&quot;
  
  HeaderView_Filter::HeaderView_Filter(Qt::Orientation orientation, QWidget * parent)
  : QHeaderView(orientation, parent)
  {
     setSectionsClickable(true);
  }
  
  void HeaderView_Filter::paintSection(QPainter *painter, const QRect &amp;rect, int logicalIndex) const
  {
     painter-&gt;save();
     QHeaderView::paintSection(painter, rect, logicalIndex);
     painter-&gt;restore();
     const double scale = 0.6*rect.height()/50.0;
     painter-&gt;setBrush(Qt::black);
     painter-&gt;translate(0,5);
     painter-&gt;scale(scale, scale);
     painter-&gt;drawPolygon(_funel);
     painter-&gt;restore();
  }
  </code></pre>
  <p>using it in form :</p>
  <pre><code>auto* tableView = _ui-&gt;tableView_Data;    
  tableView-&gt;setModel(_sortFilterProxyModel);
  tableView-&gt;setSortingEnabled(true);
  tableView-&gt;setHorizontalHeader(new HeaderView_Filter(Qt::Horizontal,tableView));
  </code></pre>