[Qt-interest] QFileDialog::getSaveFileName misbehaving ?
Constantin Makshin
dinosaur-rus at users.sourceforge.net
Sat Aug 15 22:23:42 CEST 2009
You must specify an absolute path to the file you want to select (even if
it doesn't exist). This code is functionally identical and does what you
want:
QString fileName = QFileDialog::getSaveFileName(this, tr("Save PDF File"),
QDir::currentPath() + "/outputFile.pdf", tr("Images (*.pdf)"));
On Sat, 15 Aug 2009 21:50:46 +0400, Dan White <ygor at comcast.net> wrote:
> Or I am doing something wrong.
> Qt 4.5.2 on MacOS 10.4.11
>
> Here is the statement of code:
>
> QString fileName = QFileDialog::getSaveFileName(this, tr("Save PDF
> File"), "outputFile.pdf", tr("Images(*.pdf)") ) ;
>
> It looks correct to me, based on looking at Qt Assistant.
>
> I am not getting the default file name.
> I recall this behaving in previous builds.
--
Constantin "Dinosaur" Makshin
More information about the Qt-interest-old
mailing list