Styling a QTableView,Header background property.
-
Hi,
I am trying to style a QTableWidget ,controlling the background color of the headers(horizontal and vertical) but can't quite find the right css property for this.A quick reference can be found "here":http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qtableview
I want to change the background color of the boxes that contain "day,date ,event....."Can anybody help with this?
Thanks. -
For me the following works:
@QHeaderView::section {
background-color: green; }@You can probably give the sections differing colors, or make them alternating if you want. But this may be enough of a starting point. :)
EDIT: Here a "link":http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qheaderview
I remember a different page, more like a glossary than the example-filled page you linked to. But I can't seem to find it at the moment. Once you got the basics down, I would recommend that page - I'll keep an eye out for it.EDIT2: I found the page I like to use: "Qt Style Sheets Reference":http://qt-project.org/doc/qt-4.8/stylesheet-reference.html