Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.0
-
None
Description
When setting the selectedFile property for the FileDialog in QtQuick.Dialogs.
import QtQuick import QtQuick.Window import QtQuick.Controls import QtQuick.Dialogs Window { width: 640 height: 480 visible: true Button { anchors.centerIn: parent text: "Open QtQuickDialogs FileDialog" onClicked: dialog.open() } FileDialog { id: dialog selectedFile: "hello.txt" // Works fileMode: FileDialog.SaveFile } }
The initial selected file will be correct.
But if the same is done with the QtLabsPlatform FileDialog, it will not be set correctly in the QFileDialog fallback.
import QtQuick import QtQuick.Window import QtQuick.Controls import Qt.labs.platform Window { width: 640 height: 480 visible: true Button { anchors.centerIn: parent text: "Open QtQuickDialogs FileDialog" onClicked: dialog.open() } FileDialog { id: dialog currentFile: "hello.txt" // Not used by the fallback QFileDialog fileMode: FileDialog.SaveFile } }