From 6f5477369d252c0b4a10995830d16e83098c7c8b Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 14 Aug 2016 11:58:44 +0200 Subject: FileDialog: add missing selectedNameFilter-property Change-Id: If31d657e29a9cc3049af5cd3cf39d68979ff2db0 Reviewed-by: J-P Nurmi --- examples/quickcontrols2/texteditor/qml/texteditor.qml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples') 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) } -- cgit v1.2.3