duplicated background image
Solved
General and Desktop
-
hello u all ,
i was trying to set a background image using this code :QWidget *myWidget = new QWidget();
QPixmap bkgnd(":/Images/background.jpg");
bkgnd = bkgnd.scaled(myWidget->size(), Qt::IgnoreAspectRatio);
QPalette palette;
palette.setBrush(QPalette::Background, bkgnd);
myWidget->setPalette(palette);
myWidget->setGeometry(0,0,1370,700);but i get many duplicated background images , any help plz ?
-
@mayyy said in duplicated background image:
bkgnd = bkgnd.scaled(myWidget->size(), Qt::IgnoreAspectRatio);
...
myWidget->setGeometry(0,0,1370,700);wrong order I would guess
-
This post is deleted!