PDA

View Full Version : get background color of QPushButton [PyQt4]



J-Freak
8th September 2011, 12:45
Hello everybody,

I create a plugin for the programm QuantumGIS.
I want to get the background-color of my QPushButton to use it as color for a QgsRubberBand but I don't know how I get the color.

My Code to give the QPushButton a color:

self.button_color.setStyleSheet(_fromUtf8("background-color: rgb(62, 225, 95);"))

Thanks

high_flyer
8th September 2011, 13:56
See QWidget::palette()

J-Freak
8th September 2011, 15:41
I have solved the problem with
... button.palette().color(1)
Thanks for help.

This Thread can be closed!