1、怎么把QWidget的窗口内容保存成图片?
QPixmap::grabWidget(QWidget);
2、怎样把QGraphicsView窗口的内容保存成图片?
QSize mysize(m_pScene->width(), m_pScene->height()); //获取 QGraphicsScene.size
QImage image(mysize, QImage::Format_RGB32);
QPainter painter(&image);
m_pScene->render(&painter);
image.save(pathname, "PNG", -1);