sorting - how to sort durations with Qt? -


I'm trying to create a QSortFilterProxyModel sorted item from the duration.

Prerequisite:

  1. Must not be leading zero in hours and minutes
  2. If the period is less than one hour, hours will not be displayed
  3. 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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -