PDA

View Full Version : Changing Progress Bar Colors



bpetty
11th August 2006, 17:00
I am trying to change the colors of my progress bar. For example, if there is an error while I am progressing, I want the bar to turn a color... like red.

Here is my example:


QPalette qpFailure;
qpFailure.setColor(QPalette::Base, Qt::red);
ui.progbarStatus->setPalette(qpFailure);


I think I am doing it correctly, but I don't know if my gnome window theme is effecting things. I don't know if someone has had a similar issue.

Thanks,
Brandon

jacek
11th August 2006, 17:29
Try QPalette::Highlight instead of QPalette::Base.