[Qt-interest] QSqlTableModel multi-level sort

Israel Brewster israel at frontierflying.com
Wed Apr 8 23:39:46 CEST 2009


How can I do a multiple-level sort in a QSqlTableModel? setSort only  
allows me to enter a single column (integer) and sort order. I'd  
override the setSort function, but I don't really know what it is  
doing: the source code just sets a couple of values in the single  
letter variable "d", which doesn't really help me any. I've managed to  
get it functioning by simply hard-coding the return value of the  
orderByClause() function to be what I want, but obviously this is not  
a good solution.
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------






More information about the Qt-interest-old mailing list