View Full Version : Use Style Sheets for own QWidget

22nd June 2009, 12:49

I've implemented my own widget as plugin for Qt Designer now I want to use style sheets to change the look of the whole form including my own widget.

How do I have to change my widget to use style sheet definitions like background.

How can I react on a style sheet change? And how do I get the global style sheet definitions within my widget?

Thank you in advance


PS: I'm using Qt 4.5.1.

22nd June 2009, 13:26
Look in the docs, it's really well documented ;)

22nd June 2009, 14:15
In Assistant, look for "Qt Style Sheets"

Also you can try Style Sheet example in Qt Demo->Widgets

22nd June 2009, 14:16

there is a styleSheet row at the right side of the designer for each widget. In order to change , for instance , the background just type something like the following;

background-color: red;