[Qt-interest] QSqlTableModel multi-level sort

Scott Aron Bloom Scott.Bloom at sabgroup.com
Thu Apr 9 19:38:26 CEST 2009


Use a sqlquerytable and create the query with the order by's that you
need :(

Scott



> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Israel Brewster
> Sent: Wednesday, April 08, 2009 2:40 PM
> To: qt-interest List
> Subject: [Qt-interest] QSqlTableModel multi-level sort
> 
> 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
> -----------------------------------------------
> 
> 
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list