Qt - style sheet for disabled QPushButton under the main theme of Windows 7

I can change the font and font of QPushButton using StyleSheets . The problem is that in the old Windows theme, disabled buttons show a shaded font , but I don’t know how to get rid of this shaded front through StyleSheets. Anyone can suggest their ideas about this. Thanks at Advance.

+4
source share
1 answer

Style for normal state button:

QPushButton { color: red; } 

Style for the Disabled status button:

 QPushButton:!enabled { color:blue; } 

This may solve your problem.

+6
source

Source: https://habr.com/ru/post/1443219/


All Articles