Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
None
-
6.3.0 Beta1, 6.3.0 Beta2, 6.3.0 Beta3
-
None
Description
The attached example does not work any longer in 6.3. It is not possible to retrieve the entered file name (fileMode == FileDialog.SaveFile). Works as expected in 6.2.2.
import QtQuick import QtQuick.Dialogs import QtQuick.Controls Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Button { text: "Save as..." onClicked: fd.open() } FileDialog { id: fd fileMode: FileDialog.SaveFile onAccepted: { console.log("File selected", selectedFile) } } }
Maybe this is caused by a318e6f354c8c4c504c4da42737268bf9f1bae9c?
-void QQuickFileDialog::accept() -{ - if (QPlatformFileDialogHelper *fileDialog = qobject_cast<QPlatformFileDialogHelper *>(handle())) { - // Take the currently selected files and make them the final set of files. - setSelectedFiles(fileDialog->selectedFiles()); - } - QQuickAbstractDialog::accept(); -} -