From 984b72d31b42f9457e17b7c093b80f88a6ffd29f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 15 Jul 2015 14:44:59 +0200 Subject: 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 --- examples/quick/controls/filesystembrowser/main.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'examples/quick/controls/filesystembrowser/main.qml') 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 @@ -98,12 +98,26 @@ ApplicationWindow { resizable: true } + 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)) } } -- cgit v1.2.3