[Qt-interest] Setting background color of Qdial subclass
John Posner
jjposner at snet.net
Sun Mar 1 18:06:49 CET 2009
[ this is my first message to this list; please inform me of any errors in
format or courtesy ]
Using PyQt 4.4.4-2 on Windows XP:
In a subclass of QDial, I want the entire widget to become gray when it is
disabled. This code:
mypal = app.palette()
mypal.setColor(QPalette.Disabled, QPalette.Button, Qt.lightGray)
self.setPalette(mypal)
... changes the color of a disabled dial's pointer to light gray, but does
not change the color of the circular background. I've tried this:
self.setBackgroundRole(QPalette.Window)
... (and other QPalette.XXX argument values, too), but the circular
background's color never changes with the widget's enabled/disabled state.
Can anyone help?
Tx,
John Posner
E-mail message checked by Spyware Doctor (6.0.0.386)
Database version: 5.11860
http://www.pctools.com/en/spyware-doctor-antivirus/
More information about the Qt-interest-old
mailing list