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 is used then this always evaluates to QString (the default) and 
thus sorts 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? I know that the problem is 
obviously with QSqlTableModel disregarding the types of fields in the database 
but that is hardly something that could be influenced that easily.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to