diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-14 11:58:44 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-14 10:09:17 +0000 |
commit | 6f5477369d252c0b4a10995830d16e83098c7c8b (patch) | |
tree | 0a5a046182f55bae561883e52847e8a094e15182 /examples | |
parent | 8dd5c0fd0eb3b25a700dd506af77e049e631d79d (diff) |
FileDialog: add missing selectedNameFilter-property
Change-Id: If31d657e29a9cc3049af5cd3cf39d68979ff2db0
Reviewed-by: J-P Nurmi <jpnurmi@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 7d92bea9..dbe4777e 100644 --- a/examples/quickcontrols2/texteditor/qml/texteditor.qml +++ b/examples/quickcontrols2/texteditor/qml/texteditor.qml @@ -161,6 +161,7 @@ ApplicationWindow { FileDialog { id: openDialog fileMode: FileDialog.OpenFile + selectedNameFilter: nameFilters[1] nameFilters: ["Text files (*.txt)", "HTML files (*.html *.htm)"] onAccepted: document.load(file) } @@ -170,6 +171,7 @@ ApplicationWindow { fileMode: FileDialog.SaveFile defaultSuffix: document.fileType nameFilters: openDialog.nameFilters + selectedNameFilter: document.fileType === "txt" ? nameFilters[0] : nameFilters[1] onAccepted: document.saveAs(file) } |