So basically, I have a QToolButton filled with a large icon of a playing card, and I want to overlay a QProgressBar over it.

Unfortunately I for the life of me, can not figure out how to make the QProgressbar Semi Transparent. I tried setstylesheet, but it doesnt have the proper constructors(?did I use that term right?), and I also tried this code:
Qt Code:
  1. #include <QApplication>
  2. #include <QProgressBar>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. QWidget *widget = new QWidget();
  8. QProgressBar *progress = new QProgressBar(widget);
  9.  
  10. QPalette palette(widget->palette());
  11. palette.setColor(widget->backgroundRole(), Qt::green);
  12. widget->setAutoFillBackground(true);
  13. widget->setPalette(palette);
  14.  
  15. QPalette palette1(progress->palette());
  16. palette1.setColor(progress->backgroundRole(), Qt::transparent);
  17. progress->setAutoFillBackground(true);
  18. progress->setPalette(palette1);
  19.  
  20. widget->show();
  21. return a.exec();
  22. }
To copy to clipboard, switch view to plain text mode 
as someone in #qt said they got it working... I can get it to work on certain objects, but not QProgressbar.

Any ideas?