palette for groupBox
Unsolved
General and Desktop
-
I wrote:
QPixmap bkgnd(":/immagini/sf.PNG"); bkgnd = bkgnd.scaled(ui->groupBox->size(), Qt::IgnoreAspectRatio); QPalette palette = ui->groupBox->palette(); palette.setBrush(QPalette::Background, bkgnd); ui->groupBox->setPalette(palette);
it doesn't work
-
@vale88 said in palette for groupBox:
it doesn't work
Would be nice to know what "doesn't work"...
Did you check anything?
Like https://doc.qt.io/qt-5/qpixmap.html#isNull -
@vale88 Then please check whether your pixmap is valid first...