Hi,
I'm trying to save a QPixmap using the following code:
void MainWindow::fileExport()
{
QString file = QFileDialog::getSaveFileName(this, tr
("Export as"), tr
("."), tr
("Images (*.jpg);;Images (*.tiff)"));
displayPixmap.save(file,0,100);
QMessageBox::information(this,
"Finished",
"Finished exporting");
}
void MainWindow::fileExport()
{
QString file = QFileDialog::getSaveFileName(this, tr("Export as"), tr("."), tr("Images (*.jpg);;Images (*.tiff)"));
QMessageBox::information(this, "Export", file);
displayPixmap.save(file,0,100);
QMessageBox::information(this, "Finished", "Finished exporting");
}
To copy to clipboard, switch view to plain text mode
(the QMessageBox::information are just for debugging
)
On my own computer (Vista) it works, in debug and in release mode. But when I try it on a computer of a friend of mine (also Vista), it doens't. It does display the file dialog, the message box with the filename and the finished message box, however it doesn't save the file.
Does anybody have an idea how to fix this?
Bookmarks