Unsolved QPushButton setForeGroundRole
-
I have a push button that I want the test rendered in the Link colour.
So I did:
ui->testCosmetic->setForegroundRole(QPalette::Link);
but the text colour stubbornly remained grey. Is this a bug or am I doing this wrong?
David
-
@Perdrix
The styles don't have to callforegroundRole()
to determine the text color role, sosetForegroundRole
may not always be effective.
From the doc:Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don't achieve the result you want with setForegroundRole().