This is how I change the backround or my QLabel
Pal2.
setColor(QPalette::Window, Qt
::gray);
pixmapLabel->setAutoFillBackground(true);
pixmapLabel->setPalette(Pal2);
QPalette Pal2(pixmapLabel->palette());
Pal2.setColor(QPalette::Window, Qt::gray);
pixmapLabel->setAutoFillBackground(true);
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.
Pal2.setColor(QPalette::Window, QColor::rgb(150,150,150));
To copy to clipboard, switch view to plain text mode
and
Pal2.
setColor(QPalette::Window, QRgb
::rgb(150,
150,
150));
Pal2.setColor(QPalette::Window, QRgb::rgb(150,150,150));
To copy to clipboard, switch view to plain text mode
but neither work.
Bookmarks