[PyQt] Style sheet properties..

Nick Gaens mail at nickgaens.com
Wed Mar 10 10:19:29 GMT 2010


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 <jebagnanadas at 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 at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Nick Gaens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100310/05948fa0/attachment.html>


More information about the PyQt mailing list