1 QImage image(m_Pixmap.width(), m_Pixmap.height(), QImage::Format_RGB888); 2 QPainter painter(&image); 3 m_pGraphicsScene->render(&painter); //关键函数 4 image.save("D:\\SaveGraphicsScene.bmp");
Qt QGraphicsScene保存为图片
原文:https://www.cnblogs.com/ybqjymy/p/14419034.html