I don't know if somebodyelse did the same question, but I'am unable to save the plot in other formats.
In my function I have
fileName
= QFileDialog::getSaveFileName(this, tr
("File name"),
QString(),
"Graphic files (*.svg,*png)");
print(pixmap);
if( pixmap.save(fileName, "PNG" ))
qDebug()<<"Saved";
else
qDebug()<<"Not saved";
}
fileName = QFileDialog::getSaveFileName(this, tr("File name"), QString(), "Graphic files (*.svg,*png)");
QImage pixmap;
print(pixmap);
if( pixmap.save(fileName, "PNG" ))
qDebug()<<"Saved";
else
qDebug()<<"Not saved";
}
To copy to clipboard, switch view to plain text mode
I always get "Not saved". Why?
G
Bookmarks