Qt Style Sheets Problems with QDialog
Hi,
in my application-wide css i define
Code:
* {color: #333333;}
This works in my "normal" Application. But if i start a normal QDialog-Subclass via
Code:
dgl_xyz dgl( this, Qt::Dialog );
dgl.setAttribute( Qt::WA_ShowModal );
if ( dgl.
exec() == QDialog::Accepted ) {
//...
}
the fonts color is #333333, but the font of the disabled QPushButtons are also gray instead of red.
What's wrong?
Thanks,
Lykurg
Re: Qt Style Sheets Problems with QDialog
How about:
Code:
QPushButton:enabled {color: FF0000;}
?
Re: Qt Style Sheets Problems with QDialog
works! So I learnd
Code:
QPushButton:disabled != QPushButton[enabled="false"]
in every case.
Thanks
Re: Qt Style Sheets Problems with QDialog
Quote:
Originally Posted by
Lykurg
works! So I learnd
Code:
QPushButton:disabled != QPushButton[enabled="false"]
in every case.
That's probably because of this:
Quote:
Warning: If the value of the property changes after the style sheet has been set, it might be necessary to force a style sheet recomputation. One way to achieve this is to unset the style sheet and set it again.