I want to get a background which fades from white to blue...easy...
Qt Code:
  1. QPainter painter;
  2. painter.setPen(Qt::NoPen);
  3. painter.setBackgroundMode(Qt::TransparentMode);
  4.  
  5.  
  6. QLinearGradient grad(0, 300, 3000, 3000);
  7. grad.setColorAt(0, Qt::white);
  8. grad.setColorAt(1, Qt::blue);
  9. palette.setBrush(QPalette::Background, grad);
To copy to clipboard, switch view to plain text mode 
at least I thought it was easy, 'til I realised that my File/Edit menu titles were going black with black text when I rolled over them and when they were open the whole menu became black on black....

the weird thing is, that if I relace that last line with
Qt Code:
  1. palette.setBrush(QPalette::Background, Qt::blue);
To copy to clipboard, switch view to plain text mode 
everything is how you would expect it to be...
I also changed QPalette::Background to QPalette::Window and the exact same thing happened