//自定义背景
this->setAutoFillBackground(true);
QPalette palette = this->palette();
//使用平滑的缩放方式
palette.setBrush(QPalette::Window,QBrush(QPixmap("./1.jpg").scaled(this->size(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));
//给窗口界面加上背景图
this->setPalette(palette);