By default QSortFilterProxyModel can sort few different types using
QVariant::type to see what is in it to do the correct sort. However when
the QSqlTableModel as a source model for the proxy then this always
evaluates to QString (the default) and thus sorting numbers as strings. I
wrote my own subclass of the filter model to force sorting by number but I
wonder if there is a way to tell the QSortFilterProxyModel by what type it
should sort explicitly? I am pretty sure that the problem is
with QSqlTableModel disregarding the types of fields in the database (or
QSqlQuery/QSqlDatabase behind it).
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to