summaryrefslogtreecommitdiff
path: root/examples/quick
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-08-22 16:21:41 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-09-04 13:33:53 +0200
commitf4605583e857c11247f557d665e267a1711d561b (patch)
tree751622a021b78c1f3b330602f3c55357c9dbf17d /examples/quick
parent2ba820668c86684abcad4a2b69ac49e1af9de010 (diff)
downloadqtquickcontrols-f4605583e857c11247f557d665e267a1711d561b.tar.gz
FileDialog: add sidebarVisible property and button
The sidebar takes up too much space on some devices, so now it is possible for the application author to hide it by default. The user can also toggle it with a button similar to that used for the Qt Creator sidebar, and this state is stored as a setting; however if the application sets sidebarVisible: false, that overrides the setting. [ChangeLog][QtQuick.Dialogs] FileDialog: added sidebarVisible property and button Task-number: QTBUG-39231 Change-Id: Ie8b379da02f4b12764732b2c01b79039722778ab Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/dialogs/systemdialogs/FileDialogs.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/quick/dialogs/systemdialogs/FileDialogs.qml b/examples/quick/dialogs/systemdialogs/FileDialogs.qml
index 6bdaf7bc..79a58b98 100644
--- a/examples/quick/dialogs/systemdialogs/FileDialogs.qml
+++ b/examples/quick/dialogs/systemdialogs/FileDialogs.qml
@@ -61,6 +61,7 @@ Item {
selectFolder: fileDialogSelectFolder.checked
nameFilters: [ "Image files (*.png *.jpg)", "All files (*)" ]
selectedNameFilter: "All files (*)"
+ sidebarVisible: fileDialogSidebarVisible.checked
onAccepted: {
console.log("Accepted: " + fileUrls)
if (fileDialogOpenFiles.checked)
@@ -107,6 +108,12 @@ Item {
text: "Open Files After Accepting"
}
CheckBox {
+ id: fileDialogSidebarVisible
+ text: "Show Sidebar"
+ checked: fileDialog.sidebarVisible
+ Binding on checked { value: fileDialog.sidebarVisible }
+ }
+ CheckBox {
id: fileDialogVisible
text: "Visible"
Binding on checked { value: fileDialog.visible }