Qt QPixmap::scaled:Pixmap is a null pixmap

img


问题出在第76-83行代码
执行时会报错:Pixmap is a null pixmap
界面中也就没有出现我想要的pix图片
请问怎么解决呢

从你的图中可以看到,你的win.png图片没有上传到资源文件中,可以上传一个win.png图片试试.

用绝对路径试试,最好就是转二进制,我博客有教程