Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.1
-
None
-
Win 7
-
bfd73eaba3000861037d03787f87d1f4dafefea8
Description
QFileDialog does not use specified file name.
If using static method QFileDialog::getSaveFileName in this way:
---------------------
QString fileName = tr("foo.csv");
fileName = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) +
QLatin1String("/") + fileName;
return QFileDialog::getSaveFileName
(
widget,
tr("Please, select export file name"),
fileName,
tr("Csv files (.csv);;All files (.*)")
);
---------------------
we will not see specified file name in dialog. But if we will tune file dialog with option QFileDialog::DontUseNativeDialog
-----------
QString fileName = tr("foo.csv");
fileName = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) +
QLatin1String("/") + fileName;
return QFileDialog::getSaveFileName
(
widget,
tr("Please, select export file name"),
fileName,
tr("Csv files (.csv);;All files (.*)"),
0,
QFileDialog::DontUseNativeDialog
);
-----------
we will able to see specified name.
Previously, my application was based on Qt 4.8.4. And, as I remember, I was able to use native dialog and specify file name in the same time.
Sorry for my English.