View Full Version : QFileDialog::getSaveFileName not working properly on Mac Lion

22nd September 2011, 17:13
Hey guys,

Im porting an application to Mac and in some point we ask theh user where does he want to save a certain file. To do that we use QFileDialog::getSaveFileName, the issue with this is that even if the user changes the directory, im always getting the working directory where the application is running.

QString file = somePath + someVariable;
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), file.remove(" ") + ".asc", tr("Keys (*.asc )"));

If my application is running on "/Users/Documents/workspace/project/bin", then, even if the user chooses to save the file as "/Users/someone/file.asc", what i get on fileName is "/Users/Documents/workspace/project/bin/file.asc".

Any idea why is this happening?is it a bug on Mac Lion? I know the compiler throws that Mac Lion is not supported yet... but everything seems to work pretty well except for a few things.