PDA

View Full Version : Using QStyle and StyleSheet



informatics
27th February 2007, 16:18
Hi everyone,

i have style problems with my scrollbars of a Table or ListWidget. I'm using my own QStyle, that works. But when i set my stylesheet to a widget, the customized scrollbars go away.

Example:

1. take the styles example
2. goto to widgetgallery.cpp:165 and add

tableWidget->setStyleSheet("QTableWidget { background-color: green; } ");

See the difference of the Scrollbar of the QTableWidget

Can someone knows the problem?

thx Fil

smacchia
27th February 2007, 16:46
I have seen a similar problem with combo boxes. When I use a style sheet to apply colors to the menu, the plastique style (default) puts check boxes in the selected item. So I could use help with this as well.

How do we retain styles, while using the style sheet to apply attributes to the current style?