I have two custom QPushButton
buttons. Here is the stylesheet for the Ok
button:
QPushButton { background-color:#9dce2c; border-radius:7px; border:1px solid #83c41a; color:#ffffff; font-size:15px; font-weight:bold; padding:4px 24px; text-decoration:none; } QPushButton:pressed { border:2px solid black; }
Now here is what it looks like:
what well. However, if the button is pressed (gets focus), it starts to look like this:
Notice that there is a slightly shadowed rectangle around the text. It looks like the text is "selected." When the button loses focus, it starts to look normal again. I assume this happens because the selected controls are highlighted as follows:
However, I want my button to stay the same, regardless of whether it is focused or not. Is there any way to solve this problem?
source share