diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-11 22:29:26 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-12 10:51:27 +0000 |
commit | 90842fdc865c3b7e9937bbd75f3fd5d74ec588ef (patch) | |
tree | aa4900db16b0411f9895aaa5650aab8f4792df61 /examples/quickcontrols2/texteditor/qml | |
parent | bb3453aeadf1aa3a53f2bf3c8d55b3ae3f4543b0 (diff) |
texteditor: add fileName & fileType
'document.fileName' reads better than 'document.documentTitle',
and 'document.fileType' can be set as the default suffix for
the file save dialog.
Change-Id: I935586296c91d3efdd5edea03d81c685e7edcab2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols2/texteditor/qml')
-rw-r--r-- | examples/quickcontrols2/texteditor/qml/texteditor.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quickcontrols2/texteditor/qml/texteditor.qml b/examples/quickcontrols2/texteditor/qml/texteditor.qml index a24a174b14..ca4f196d02 100644 --- a/examples/quickcontrols2/texteditor/qml/texteditor.qml +++ b/examples/quickcontrols2/texteditor/qml/texteditor.qml @@ -53,7 +53,7 @@ ApplicationWindow { width: 1024 height: 600 visible: true - title: document.documentTitle + " - Text Editor Example" + title: document.fileName + " - Text Editor Example" Component.onCompleted: { x = Screen.width / 2 - width / 2 @@ -169,7 +169,7 @@ ApplicationWindow { FileDialog { id: saveDialog fileMode: FileDialog.SaveFile - defaultSuffix: "html" + defaultSuffix: document.fileType nameFilters: openDialog.nameFilters onFileSelected: document.saveAs(file) } |