Hi,
 Thanks for your explaination! I'll try it!

Yan Yaqin




在2009-02-04,"Harald Fernengel" <[email protected]> 写道:
>Hi,
>
>On Wednesday 04 February 2009 02:28:38 yanyaqin2004 wrote:
>> Hi,
>>   It is usefule if class QSqlQueryModel has the virtual function sort.
>> What's you opinion ?
>
>In QSqlQueryModel, the developer defines the SQL query. The model doesn't 
>touch 
>it.
>
>In QSqlTableModel, the class creates the SQL query, so it can also set the 
>ORDER BY clause.
>
>Sorting in QSqlQueryModel must be done by the developer himself by setting the 
>appropriate ORDER BY clause.
>
>If you don't want to sort server-side, but do it client-side, I suggest to use 
>a QSortFilterProxyModel.
>
>Hope this helps,
>Harald
>_______________________________________________
>Qt4-preview-feedback mailing list
>[email protected]
>http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to