QHeaderView that supports showing multiple sections as one. More...
#include <pqMultiColumnHeaderView.h>
Inherits QHeaderView.
Public Member Functions | |
pqMultiColumnHeaderView (Qt::Orientation orientation, QWidget *parent=nullptr) | |
~pqMultiColumnHeaderView () override | |
Protected Member Functions | |
void | paintSection (QPainter *painter, const QRect &rect, int logicalIndex) const override |
QHeaderView that supports showing multiple sections as one.
pqMultiColumnHeaderView extents QHeaderView to support showing multiple adjacent sections as a single section. This is useful for showing vector quantities, for example. Instead of each component taking up header space and making it confusing to understand that the various sections are part of the same vector, pqMultiColumnHeaderView can show all those sections under a single banner. It still supports resizing individual sections thus does not inhibit usability.
pqMultiColumnHeaderView simply combines adjacent sections with same (non-empty) QString
value for Qt::DisplayRole
. This is done by overriding QHeaderView::paintSection
and custom painting such sections spanning multiple sections.
Definition at line 27 of file pqMultiColumnHeaderView.h.
pqMultiColumnHeaderView::pqMultiColumnHeaderView | ( | Qt::Orientation | orientation, |
QWidget * | parent = nullptr |
||
) |
|
override |
|
overrideprotected |