i'm trying to make QSortFilterProxyModel sort items by duration.
preconditions:
- hours and minutes must not have leading zeros
- if duration is less than an hour, then hours must not be displayed, but only minutes and seconds
- if duration is less than a minute, then 0 minutes and the corresponding number of seconds must be displayed [0:42]
tried to store durations in the source model as H:mm:ss (http://doc.trolltech.com/4.6/qtime.html#toString) if they are one hour or longer, and as m:ss - if less than an hour, but since sorting of QStrings is alphabetical, then, for instance, 5:20 is "more" than 12:09 as its first digit is greater.
is there an elegant way to do the sorting?