Hi,
I´m trying to create a Widget that displays the content of a "virtual Folder".
"Virtual Folder", since the Elements, that need to be displayed later, were delivered by a Server in XML Format.
The XML File contains all informations, that QDir and QFileInfo would offer.
If possible, I would like to realise the whole Widget in a single extended subclass of QTreeWidget.
2 Points need to be considered:
1.) The Folders should always be displayed on top. While Files can be sorted by Name, Type, Size, ... (Asc & Dsc), the Folders should always be sorted by Name (Asc / Dsc) and stay on top of the list.
2.) The Columns should contain Human readable data (QStrings), but need to be sorted by sortable values (QStrings, qint64, QDateTime, ...)
i.e. the Size Columns:
Text in Item Column : 1,00 Mb (QString) - should be sorted by -
Data in Item Column : 1048576 (qint64 )
Basically, you can reduce my post to one single question:
Is there a way to differ between the displayed Text and the (hidden) sortable value of an Item?
I would use this as an advantage, to hold the Folders always on Top, by prepending data to the sortable values.
Thanks in advance for any kind of clue.
Bookmarks