Hi, in my program the user presses a button and gets the color dialog where he can choose a color. after that I want to change the color of this button to the new color but only the border is set to a new color and not the background of the button. (PyQt4 and Qt 4.2.1, Linux and Windows)

newColor = QColorDialog.getColor(self.color)
if (newColor.isValid()):
  self.color = newColor
  palette = QPalette()
  palette.setColor(QPalette.Button, self.color)
  self.colorButton.setPalette(palette)
  self.colorButton.setAutoFillBackground(TRUE)
  Btw it worked fine with Qt3.

Thanks for your help.
Katja _______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to