[PyQt] setting color of window titlebar or window background

Hans-Peter Jansen hpj at urpla.net
Mon Oct 17 21:00:59 BST 2011

On Sunday 16 October 2011, 21:14:44 Brad Buran wrote:
> When users of my program run it in test mode, it is not actively
> saving data.  Once in a while, a user forgets that they are in test
> mode and attempts to run an experiment only to realize that the data
> wasn't being saved after they're done.  Is it possible to change the
> color of the title bar or background to indicate that it is in test
> mode?  Something like a bright red title bar would be ideal, but I'm
> ok with anything that I can set to visually indicate the difference
> between test and data collection mode that's obvious enough to a
> user.

Yes, of course, but the price is high: draw your own and mimic the 
window manager behavior (move, hide, {min,max}imize, quit..).

How about coloring the background of your app, add some text to the 
title bar or color your icon red?


More information about the PyQt mailing list