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");