[PyQt] App Color/Style Themes

Hans-Peter Jansen hpj at urpla.net
Tue May 17 10:14:13 BST 2011


On Monday 16 May 2011, 18:44:59 James Polk wrote:
> Anyone have any experience working with,tweeking, and/or creating new
> app color schemes?

You can change your applications color scheme by tweaking QPalette and 
calling QApplication.setPalette().

> ...the one's specificed with "app.setStyle()"... 
> Of the released ones:
>
> "Plastique",
> "CDE",
> "motif",
> "SGI",
> "Windows",
> "CleanLooks",
> "Mac"
>
> is there a way to tweek the colors in these? Where are they found?
> Can one create a new one from scratch? or a derivative of the above?

You're mixing color schemes and styles here. Since some QStyles are 
loaded as a plugin, Phil doesn't support QStyle subclassing at all. 
To support this, an auxilliary sip module needs to be created, that 
copes with the nature of plugins. 

Please refer to a discussion of mine with Phil half a year ago on this 
list.

> Are these "themes" related to or the same as "styleSheets" ?

Well, themes derive from QStyle and stylesheets manipulate QStyle 
attributes.

Hth,
Pete


More information about the PyQt mailing list