2

enter image description here

How to change the focus color of pushbutton as I described in attached image ?

I also changed the background color of button,and also try to palette but still no change occurred in pushbutton, please help me to solve this problem..

lucifer
  • 175
  • 14
  • Possible duplicate of [QT - CSS: decoration on focus](http://stackoverflow.com/questions/17280056/qt-css-decoration-on-focus) – Gluttton Feb 29 '16 at 10:51

1 Answers1

2

Use stylesheets:

QPushButton:focus:pressed{ background-color: some_colour; }
QPushButton:focus{ background-color: some_other_colour; }

You can either use the Qt Creator to add the styles to your button or load them inside your code by calling setStyleSheet("...") on your button.

rbaleksandar
  • 8,713
  • 7
  • 76
  • 161