dictoon
15th January 2012, 13:32
The title says it all: I seem unable to change the background color (or any other property) of a QHeaderView section using the QHeaderView::section:selected selector using Qt 4.7.0. Here's the relevant code:
QHeaderView::section:selected
{
background-color: red;
}
This is what I have now:
7269
And this is what I would like to achieve (the selected section is highlighted):
7270
According to the documentation (http://developer.qt.nokia.com/doc/qt-4.7/stylesheet-reference.html), this ought to be possible:
QHeaderView: Supports the box model. The sections of the header view are styled using the ::section sub control. The section Sub-control supports the :middle, :first, :last, :only-one, :next-selected, :previous-selected, :selected, and :checked pseudo states.
Am I doing it right?
(I couldn't find anything on that subject in the bug database, and I don't have Qt 4.8 handy to check if the behavior is different.)
Cheers,
Franz
QHeaderView::section:selected
{
background-color: red;
}
This is what I have now:
7269
And this is what I would like to achieve (the selected section is highlighted):
7270
According to the documentation (http://developer.qt.nokia.com/doc/qt-4.7/stylesheet-reference.html), this ought to be possible:
QHeaderView: Supports the box model. The sections of the header view are styled using the ::section sub control. The section Sub-control supports the :middle, :first, :last, :only-one, :next-selected, :previous-selected, :selected, and :checked pseudo states.
Am I doing it right?
(I couldn't find anything on that subject in the bug database, and I don't have Qt 4.8 handy to check if the behavior is different.)
Cheers,
Franz