[Qt-interest] QSqlTableModel multi-level sort

Israel Brewster israel at frontierflying.com
Thu Apr 9 20:21:58 CEST 2009


Well, that would work for the sort, but then I'd have to deal with the  
fact that QSqlQueryModel is not editable. Making it editable, however,  
might still be cleaner. I'll look into it. Thanks!
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------



On Apr 9, 2009, at 9:38 AM, Scott Aron Bloom wrote:

> 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
>
> _______________________________________________
> 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