[Qt4-preview-feedback] QFileDialog::getSaveFileName return wrong path on OSX
Julien Bachmann
julien.bachmann at mnemis.com
Thu Feb 12 10:56:32 CET 2009
Hello,
I'm using QT 4.5 RC1.
When I'm using the QFileDialog::getSaveFileName method on OSX the
returned QString is not what I have selected in the save panel. The
following sample illustrate the problem:
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
const QString defaultSaveFile = QDir::homePath () + "/NewFile.txt";
qDebug() << defaultSaveFile;
QString result = QFileDialog::getSaveFileName ( NULL, "Test save
dialog", defaultSaveFile,"Text file (*.txt)");
qDebug() << result;
}
First when the save panel is open, it displays "untitled" instead of
"NewFile.txt". Then if I change the destination directory and click
save, the returned path is always the home path.
The problem is only on Mac OSX (10.5). It works well under Windows XP.
Regards,
Julien
More information about the Qt4-feedback
mailing list