Sorting numbers in QSortFilterProxyModel with QSqlTableModel source
-
Hi,
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 the this always evaluates to QString 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? 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.
-
Hi,
Interesting question, I think you should rather ask it on the interest mailing list. You'll find the Qt's developers/maintainers. This forum is more user oriented
-
Thanks, I have posted to [Interest].
-
Did you subscribe first ?
-
Yes although I have not received any confirmation.
-
Then you're likely not subscribe, did you check your spam folder for the confirmation message ?
-
I did but nothing there. I am using gmail and and all qt related e-mails got through fine. I will try alternative e-mail if that would work.