QML Controls FileDialog "folder" property not working in Windows to set startup path
-
Hey,
Setting the "FileDialog.folder":http://qt-project.org/doc/qt-5.1/qtquickdialogs/qml-qtquick-dialogs1-filedialog.html#folder-prop property in QML before calling FileDialog.open() does not seem to set the startup path correctly.
Qt: 5.1
OS: Win-8Documentation states:
bq. Setting this property before invoking open() will cause the file browser to be initially positioned on the specified folder.
^^ does not mention anything about only working for OSX/Linux. Currently that seems to be the case tho. Setting "folder" property works for Linux / Mac but not in Windows.
The Dialogs examples coming with Qt 5.1 has "FileDialogs.qml" with the following:
@
// TODO: QTBUG-29814 This isn't portable, but we don't expose QDir::tempPath to QML yet.
onClicked: fileDialog.folder = "/tmp" // file:///tmp would also be OK
@I think that bug is only about temp path missing and not the actual property itself not working.
Also the "folder" property works when you make a selection as in once a selection is made, it gives the correct new path url however it's just the Startup that seems to have a problem.
Things I've tried:
@fileDialog.folder = "file:///C:/Users/"@
-> QWindowsNativeFileDialogBase::shellItem: SHCreateItemFromParsingName(/C:/Users/)) failed (An attempt was made to reference a token that does not exist.)
@fileDialog.folder = "file://C:/Users/"@
-> QWindowsNativeFileDialogBase::shellItem: SHCreateItemFromParsingName(/Users/)) failed (An attempt was made to reference a token that does not exist.)
@fileDialog.folder = "C:/Users/"@
-> QWindowsNativeFileDialogBase::shellItem: SHCreateItemFromParsingName(/Users/)) failed (An attempt was made to reference a token that does not exist.)
@fileDialog.folder = "C:/Users"@
-> QWindowsNativeFileDialogBase::shellItem: SHCreateItemFromParsingName(/Users/)) failed (An attempt was made to reference a token that does not exist.)
@fileDialog.folder = "/C:/Users"@
-> QWindowsNativeFileDialogBase::shellItem: SHCreateItemFromParsingName(/C:/Users/)) failed (An attempt was made to reference a token that does not exist.)
Is this a bug I should report or am I missing something here?
-