我现在想在对话框上加背景图片,可是怎么对话框显示没有图片啊 ,请问有高人指点吗?谢谢 代码如下
QPixmap *pixmap = new QPixmap("IMG_0071.bmp");
if(!pixmap->isNull ())
{
qDebug("hell0");
QPalette palette;
palette.setBrush(QPalette::Window, QBrush(*pixmap));
this->setPalette(palette);
setAutoFillBackground(true);
}
else
{qDebug("wrong!");}