Rotated Table Header with Qt4 QHeaderView
Completion for the Run Analysis Dialog Grid Table
Phil Weinstein -- 9-19-2008 -- Hit Refresh  /  Go To Project Index

RwColumnHeaderWidget is an implementation of a Qt4 QHeaderView for horizontal headers (column headers) for QTableViews and QTreeViews -- with capabilities currently sufficient to support rotated text for the Run Analysis Dialog Grid Table. SEE:

Main Page ... Header Comment ... Windows Screenshots ... Solaris Screenshots ... Custom Font ... Drawing Fix
 
 
The motivation for this development was the need for a Qt4 widget supporting rotated column header text drawing for the Run Analysis Dialog grid table.

Also, though, Trolltech, in Qt4, didn't provide an item-based subclass of QHeaderView (i.e. no QHeaderWidget) for use in QTableView and QTreeView (for also non-hierarchical multiple-column lists). So this class provides a format mode for non-rotated text for more general use (see image below). However the following capabilities for more general use are not yet implemented, as they are not required for the current development.

NOT YET IMPLEMENTED:

Note on Selection Ornamentation. Two levels of column selection ornamentation are implemented in RwColumnHeaderWidget's custom drawing:

  1. If all the cells in a column are selected, beveled borders are drawn to give the header section a depressed appearance, and the background is slightly darker.
  2. If only some of the cells in a column are selected, only beveled borders are drawn (depressed appearance). The background color is not changed.

Unlike the selection ornamentation implemented in header widgets by Trolltech, bolded text is not used to indicate a selected column. The bolded state of the default font, and of probably most fonts, is a different size -- and this wreaks havoc with geometry computations -- Trolltech doesn't even take care of this within their own widgets. The problem is apparent only on Windows -- and not Solaris because on Solaris the default font is already bolded.

Main Page ... Header Comment ... Windows Screenshots ... Solaris Screenshots ... Custom Font ... Drawing Fix