QPainter p(this);
QPixmap pixmap;
pixmap.load("E:\\参考文件\\image\\1.jpg");
//QPixmap->QImage
QImage tempImage = pixmap.toImage();
p.drawImage(0,0,tempImage);
QImage image;
image.load("E:\\参考文件\\image\\1.jpg");
//QImage->QPixmap
QPixmap tempPixmap = QPixmap::fromImage(image);
p.drawPixmap(450,0,tempPixmap);
QPixmap QImage 相互转化
最新推荐文章于 2024-07-13 23:02:25 发布