the source code
QPalette p = palette();
QPixmap pixmap1(":/new/prefix1/BG");
QDesktopWidget* desktopWidget = QApplication::desktop();
QRect rect = desktopWidget->availableGeometry();
QSize size(rect.width() , rect.height());
QPixmap pixmap(pixmap1.scaled(size));
p.setBrush(QPalette::Background, pixmap);
setPalette(p);
when the project is built in the output console it displays—QPixmap::scaled: Pixmap is a null pixmap
↧