This is how I change the backround or my QLabel
Qt Code:
  1. QPalette Pal2(pixmapLabel->palette());
  2. Pal2.setColor(QPalette::Window, Qt::gray);
  3. pixmapLabel->setAutoFillBackground(true);
  4. pixmapLabel->setPalette(Pal2);
To copy to clipboard, switch view to plain text mode 
I would now like to change the background color to rgb color where I replace "Qt::gray" with RGB numbers. How do I do that?
So far I've tried this.
Qt Code:
  1. Pal2.setColor(QPalette::Window, QColor::rgb(150,150,150));
To copy to clipboard, switch view to plain text mode 
and
Qt Code:
  1. Pal2.setColor(QPalette::Window, QRgb::rgb(150,150,150));
To copy to clipboard, switch view to plain text mode 
but neither work.