Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.3
-
None
-
8353f84141 (qt/qtdeclarative/dev) 86973d9f33 (qt/qtdeclarative/6.3) 86973d9f33 (qt/tqtc-qtdeclarative/6.3)
Description
selectedFile is currently read-only, and after https://codereview.qt-project.org/c/qt/qtdeclarative/+/381801, it's no longer possible to set currentFile to pre-select a file. For example, in 6.2.3 you could do this:
import QtQuick import QtQuick.Controls import QtQuick.Dialogs ApplicationWindow { width: 600 height: 600 visible: true FileDialog { visible: true fileMode: FileDialog.SaveFile currentFile: "file:///Users/foo/existing-file.txt" } }
One option is to make selectedFile writable. Another is to add an initialFile property.
Attachments
Issue Links
- is duplicated by
-
QTBUG-102990 [Reg 6.2->6.3] QML FileDialog lost ability to set initial filename
-
- Closed
-
For Gerrit Dashboard: QTBUG-101975 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
410263,24 | FileDialog: make selectedFile writable | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
414062,3 | FileDialog: make selectedFile writable | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |