diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-14 15:02:50 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-13 09:37:56 +0000 |
commit | 658b0f610a71fab8c103b913d2cfd11c3c7c6bef (patch) | |
tree | 0d3abb07e0abd64d574cf11983e71b19f67aa87b /examples | |
parent | 829c4232906a91e6be94a3da3f10bd679056fd56 (diff) |
Platform: add experimental StandardPaths
This complements the File/FolderDialog offering.
Change-Id: I44a105724321092a6efc4126c8fb25f7d31b77e2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quickcontrols2/texteditor/qml/texteditor.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/quickcontrols2/texteditor/qml/texteditor.qml b/examples/quickcontrols2/texteditor/qml/texteditor.qml index 5feae894..8cc33c6d 100644 --- a/examples/quickcontrols2/texteditor/qml/texteditor.qml +++ b/examples/quickcontrols2/texteditor/qml/texteditor.qml @@ -164,6 +164,7 @@ ApplicationWindow { fileMode: FileDialog.OpenFile selectedNameFilter: nameFilters[1] nameFilters: ["Text files (*.txt)", "HTML files (*.html *.htm)"] + folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation) onAccepted: document.load(file) } @@ -173,6 +174,7 @@ ApplicationWindow { defaultSuffix: document.fileType nameFilters: openDialog.nameFilters selectedNameFilter: document.fileType === "txt" ? nameFilters[0] : nameFilters[1] + folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation) onAccepted: document.saveAs(file) } |