You might take a look at so called "Selector types" (
http://qt.nokia.com/doc/4.3/stylesheet-syntax.html#selector-types). Given a
QDialog and its children (e.g. QPushButtons), this can prevent this
cascading behaviour of styles, although I've never had any problems with
that without using this way of "selecting" matching objects..

Can you show a small piece of code (small stylesheet and the way you apply
it) please?

On Tue, Mar 9, 2010 at 9:05 PM, Jebagnana Das <jebagnana...@gmail.com>wrote:

> Hello all,
>
> If i apply a property to a parent widget it is automatically applied for
> child widgets too.. Is there any way of preventing this??
>
> For example if i set background color as white in a dialog then any
> button,combo boxes and scroll bars(within the dialog) looks white and it
> lacks it's native look(have to say it's unpleasant to the eyes(esp. in unix)
> & ugly).. Is there any way that i can apply the stylesheets only to a parent
> widget not to it's children? can i exclude specifically some child widgets
> from not inheriting parent SS properties??
>
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Nick Gaens
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to