QT QImage 无法加载图片 png jpg

需要在Debug(或者Release)目录下面放置imageformats  : Debug\imageformats imageformats 

在 Qt安装目录的plugins下面,直接拷贝过来就可以了。

记得确认一下目录:QImage(":/images/posy.jpg") 是当面代码目录的images文件夹。

猜你喜欢

转载自blog.csdn.net/u200814342A/article/details/79248792
今日推荐