Take the 2-minute tour ×  I have a QTreeView subclass (and
QAbstractItemModel subclass) which has a nice horizontal header.
I would like to add vertical headers (going down the left side)
to match. But unlike QTableView which has separate vertical
(setVerticalHeader()) and horizontal headers
(setHorizontalHeader()), QTreeView only allows a single header
(setHeader()).  I know that I can just pretend that the leftmost
column is the header and render it with a different background
color (I don't need the ability to resize or rearrange the rows,
so I wouldn't have to implement any of those special behaviors).
But that doesn't take into account local styles. For example, on
my system the headers have a slight gradient, giving them an
almost 3D look.  I am therefore looking for either a way to add
a proper vertical header (I am guessing it would be a subclass
of QHeaderView) or else rendering a header down the leftmost
column, but rendering it the Right Way.  share|improve this
question add comment  1 Answer  up v