sorting - how to sort durations with Qt? -
I'm trying to create a QSortFilterProxyModel sorted item from the duration.
Prerequisite:
- Must not be leading zero in hours and minutes
- If the period is less than one hour, hours will not be displayed
- If the duration is less than one minute, then 0 minutes and related number seconds should be displayed [0:42]
Attempted to store H: mm: ss () as one of the source models, they are one hour or more, and M: SS - if less than an hour What QStrings is alphabetical After sorting, for example, 5:20 "12" than the "more" because its first points higher
What a great way to sorting?
- To set the data for an item, call "SetData", q Set the qetime object straight
- Display the subclass QItemDelegate and just drag a text, override the size hunt if necessary
- to set your representative for the column QAbstractItemView :: setItemDelegateForColumn Call.
From this perspective, you can display your quarter data from your perspective, and sort correctly.
Comments
Post a Comment