I have a little game I'm making in qt 4.1. Right now I'm doing this part while on a windows XP machine. I have a mainwindow which basicall gets created like this

Qt Code:
  1. GUI::GUI() {
  2. // setting the max/min size
  3. setMinimumSize(350, 450);
  4. setMaximumSize(350, 450);
  5.  
  6. // filling the background with white
  7. //setAutoFillBackground(true);
  8. QPalette palette;
  9. palette.setColor(QPalette::Background, Qt::white);
  10. setPalette(palette);
To copy to clipboard, switch view to plain text mode 

Now when i start a new game I want to overlay like a black widget that has like a 50% transparency so you can still see the little gameboard and such. I am having no such luck getting another widget to be transparent over my mainwindow

Here is my latest attempt at trying to get it to work

Qt Code:
  1. QWidget *blackBG = new QWidget(this);
  2. blackBG->setGeometry(0,0,350,450);
  3. blackBG->setAutoFillBackground(true);
  4. blackBG->setPalette(QPalette(QPalette::Background, Qt::black));
  5. blackBG->setWindowOpacity(.5);
  6. blackBG->show();
To copy to clipboard, switch view to plain text mode 

any help? thanks!