64,649
社区成员
发帖
与我相关
我的任务
分享
void MView::takeShot(QAction *a)
{
QString format = a->text();
QString filename = QFileDialog::getSaveFileName(
this, "Choose a filename to save under", "", "*." + format);
if (!filename.isEmpty())
{
QImage image = glmesh->renderPixmap().toImage();
if (image.save(filename, format.toLatin1().data()) == FALSE)
QMessageBox::warning(this, "Save screenshot", "Could not save image!");
}
}
class GLMesh : public QGLWidget