[Qt4-preview-feedback] Suggestion: move QSqlTableModel::sort
yanyaqin2004
yanyaqin2004 at 163.com
Wed Feb 4 15:03:40 CET 2009
Hi,
Thanks for your explaination! I'll try it!
Yan Yaqin
在2009-02-04,"Harald Fernengel" <harald at trolltech.com> 写道:
>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
>Qt4-preview-feedback at trolltech.com
>http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt4-feedback/attachments/20090204/9a56f940/attachment.html
More information about the Qt4-feedback
mailing list