drave
12th December 2009, 12:40
This code (on Qt 4.6)
QPalette Pal = ui->lcdNumber->palette();
Pal.setColor(QPalette::Normal, QPalette::WindowText, Qt::green);
Pal.setColor(QPalette::Normal, QPalette::Window, Qt::black);
ui->lcdNumber->setPalette(Pal);
changes the digits to green OK but has no effect on the background color, which remains light grey.
Why not ?
How can i change the background color ?
thanks
QPalette Pal = ui->lcdNumber->palette();
Pal.setColor(QPalette::Normal, QPalette::WindowText, Qt::green);
Pal.setColor(QPalette::Normal, QPalette::Window, Qt::black);
ui->lcdNumber->setPalette(Pal);
changes the digits to green OK but has no effect on the background color, which remains light grey.
Why not ?
How can i change the background color ?
thanks