[Qt-interest] Coloring a header
Christoph Keller
gri at not-censored.com
Tue Mar 23 15:24:21 CET 2010
Hello,
if your header is drawn by the operating system api (windows for sure
and I think, osx also), the BackgroundRole is not respected.
To make sure the background is drawn like you want it, you could create
a proxy style and assign it to your header view.
Greetings,
Christoph
Am 23.03.2010 13:51, schrieb SALOMEHER at terra.es:
> Hi,
>
> I have a QAbstractTableModel and I have reimplemented some of its
> functions including:
> data (const QModelIndex & index, int role) and headerData (int section,
> Qt:: Orientation orientation, int role)
> But I can not color the background of a header, ie data () if I can use
> role == Qt:: BackgroundRole and assign a color, but this role does not
> work headerData.
>
> Is it possible to color a header?
>
> Regards.
More information about the Qt-interest-old
mailing list