图片的加载与显示 头文件 #include <qimage.h> #include <qlabel.h> #include <qpixmap.h> //加载原图与显示 QLabel* label=new QLabel("",0); QImage img; img.load("F:/Chrome download/square"); QPixmap mp; mp=mp.fromImage(img); label->setPixmap(mp); label->show(); 效果图: