QTextEdit - unable to modify base color
Solved
General and Desktop
-
Hi All,
I've a
QTextEdit
calledsecondsText
, I need to change the base color, so I tried as follows in the constructor, which doesn't work:QPalette p = ui->secondsText->palette(); p.setColor(QPalette::Base, Qt::green); ui->secondsText->setPalette(p);
Base color is still the default (white), what might be the issue?
-
@viniltc said in QTextEdit - unable to modify base color:
- Test against
QPalette::Text
, to verify whether that works on foreground, just so you know. - If you have any stylesheet
background-color
specified, including back up the hierarchy I think, that will override.
- Test against