Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.6.3, 4.7.0, 4.7.1, 4.7.2, 4.8.0, 4.8.x, 5.0.0, Some future release
-
None
Description
For exmple:
bool QTableWidgetItem::operator<(const QTableWidgetItem &other) const { const QVariant v1 = data(Qt::DisplayRole), v2 = other.data(Qt::DisplayRole); return QAbstractItemModelPrivate::variantLessThan(v1, v2); }
Suppose, We have column "event time" which is storing time_t as Qt::SortRole and "Today","last week" and so on in Qt::DisaplayRole
( Now, I use hidden column with time_t just for correct sorting )
It will be nice, if Qt::SortRole role data may be specified. When no such role set, standard implementation should user Qt::DisplayRole.
Also, please update Documentation in QTableWidget and maybe other places where you are talking about sorting, that sorting is based on Qt::DisplayRole.