summaryrefslogtreecommitdiffstats
path: root/examples/quick/controls/filesystembrowser/main.qml
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-15 14:44:59 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-16 11:14:39 +0000
commit984b72d31b42f9457e17b7c093b80f88a6ffd29f (patch)
tree087769c7215a9341b4a4cd4bcc87eaafca2480e1 /examples/quick/controls/filesystembrowser/main.qml
parentc48d14501fff75741c5d218141005831cd8dc051 (diff)
Polish the new filesystembrowser example.
Introduce a special model that provides more information. Replace numerical permissions column by a readable, ls-style string and add size/date columns. On activation, launch the file using Qt.openUrlExternally() with the local file URL. Change-Id: Ic0801e40cc3ad8498129da06670ba7e11bbf8003 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'examples/quick/controls/filesystembrowser/main.qml')
-rw-r--r--examples/quick/controls/filesystembrowser/main.qml16
1 files changed, 15 insertions, 1 deletions
diff --git a/examples/quick/controls/filesystembrowser/main.qml b/examples/quick/controls/filesystembrowser/main.qml
index 454a9f31d..abc3c20cd 100644
--- a/examples/quick/controls/filesystembrowser/main.qml
+++ b/examples/quick/controls/filesystembrowser/main.qml
@@ -99,11 +99,25 @@ ApplicationWindow {
}
TableViewColumn {
+ title: "Size"
+ role: "size"
+ resizable: true
+ horizontalAlignment : Text.AlignRight
+ }
+
+ TableViewColumn {
title: "Permissions"
- role: "filePermissions"
+ role: "displayableFilePermissions"
+ resizable: true
+ }
+
+ TableViewColumn {
+ title: "Date Modified"
+ role: "lastModified"
resizable: true
}
onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index)
+ onActivated : Qt.openUrlExternally(fileSystemModel.data(index, 263))
}
}