From a30a4c02d1c8a9c8442010b6ae12a2477c936b92 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 3 Oct 2010 14:26:00 +0200 Subject: Change display in FSWidget Display "Date modified" field in FSWidget as dd-mm-yyyy. Also show mime- I guess I should subclass QFileSystemModel instead of reimplementing data() in the proxy, because sorting by mimetype doesn't work as expected. Unfortunately the reason eludes me... --- filesystemfileproxy.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'filesystemfileproxy.h') diff --git a/filesystemfileproxy.h b/filesystemfileproxy.h index 9f9609b..a7b5e18 100644 --- a/filesystemfileproxy.h +++ b/filesystemfileproxy.h @@ -18,7 +18,10 @@ class FilesystemFileProxy : public QSortFilterProxyModel { public: FilesystemFileProxy(QObject *parent = 0); ~FilesystemFileProxy() {}; - bool lessThan(const QModelIndex &left, const QModelIndex &right) const; + virtual QVariant data(const QModelIndex &index, int role) const; + + protected: + virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const; }; #endif -- cgit v1.2.3-70-g09d2