嘎嘎,没有想到你真不知道,设置背景图片方法如下:
1: 载入图片,QPixmap pixmap("xxx.bmp");并检测是否成功
2: 按图片大小设置窗体大小,可以让窗口适应图片,setFixedHeight(pixmap.height());setFixedWidth(pixmap.width());
3:设置mask setMask(pixmap.createHeuristicMask(true));
4:设置画刷 palette.setBrush(QPalette::Window,QBrush(pixmap));
5:设置调色板 this->setPalette(pal);
6: OK,
要是有什么问题 再QQ我