在paintEvent(QPaintEvent *)实现函数里绘制图片出现边缘锯齿解决办法:
pixmap.loadFromData(sealImage,sealImageLen);
pixmap = pixmap.scaled(w, h, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
painter.setRenderHints(QPainter::SmoothPixmapTransform);
painter.drawPixmap(0,i*(pageHeight+5),pageWidth,pageHeight,pix.transformed(matrix,Qt::SmoothTransformation));
如果觉得《QPainter QPixmap 抗锯齿》对你有帮助,请点赞、收藏,并留下你的观点哦!