Persoontje
22nd November 2009, 11:20
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)"));
QMessageBox::information(this, "Export", file);
displayPixmap.save(file,0,100);
QMessageBox::information(this, "Finished", "Finished exporting");
}
(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?
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)"));
QMessageBox::information(this, "Export", file);
displayPixmap.save(file,0,100);
QMessageBox::information(this, "Finished", "Finished exporting");
}
(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?