PDA

View Full Version : Style Sheet Question



zgulser
23rd April 2012, 19:58
Hi,

As far as I know a widget does not inherit it's parent style sheets as the documentation says as well;



When using Qt Style Sheets, a widget does not automatically inherit its font and color setting from its parent widget.


But in the "Cascading" part of the document it says;



An arbitrary widget's effective style sheet is obtained by merging the style sheets set on the widget's ancestors (parent, grandparent, etc.), as well as any style sheet set on the QApplication.


Here it says a widget can inherit the style sheet. So what's the deal here?

Thanks from advance..

sedi
26th April 2012, 19:27
It depends on the selector type you are using when setting the style sheet. Read here:
StyleSheet Syntax (http://qt-project.org/doc/qt-4.8/stylesheet-syntax.html)