Hi,
I need to change the color of a progress bar depending on its value.
I tried in some ways with poor results.
QPalette pal
= ui
->progressBar
->palette
();
//pal.setColor(QPalette::Highlight, Qt::red);
//pal.setColor(QPalette::Background, Qt::red);
ui->progressBar->setPalette(pal);
QPalette pal = ui->progressBar->palette();
pal.setColor(QPalette::Normal, QPalette::Base, QColor("red"));
//pal.setColor(QPalette::Highlight, Qt::red);
//pal.setColor(QPalette::Background, Qt::red);
ui->progressBar->setPalette(pal);
To copy to clipboard, switch view to plain text mode
I also tried to change stylesheet from QT Creator, but nothing happens.
where am I wrong?
I'm using Qt 4.7, QT Creator 2.0.1, Ubuntu 10.10 64 bit.
thanks
Bookmarks