Don't know. Your code works perfect on my computer (Linux). You can try style sheets. Why palette is not working on your side could be, that you overwrite it later again? Try a minimal example on your side:
	
	- #include <QtCore> 
- #include <QtGui> 
-   
- int main(int argc, char **argv) 
- { 
-     pal. setColor(QPalette::Highlight- , Qt ::green)- ; 
-     pb.setPalette(pal); 
-     pb.setValue(50); 
-     pb.show(); 
-     return app.exec(); 
- } 
        #include <QtCore>
#include <QtGui>
int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    QProgressBar pb;
    QPalette pal = pb.palette();
    pal.setColor(QPalette::Highlight, Qt::green);
    pb.setPalette(pal);
    pb.setValue(50);
    pb.show();
    return app.exec();
}
To copy to clipboard, switch view to plain text mode 
  
				
			
Bookmarks