[Qt-interest] QTableView is not updated after sort (Qt 4.6 Windows)
Smokey McPott
mailslave3000 at googlemail.com
Sun Jan 10 20:52:47 CET 2010
The documentation for QSortFilterProxyModel states that sorting can either
be done via a proxy model or by implementing a sort function inside the
source model. I did the latter so it should work. The problem is not that
the sorting is not performed. It's just that the screen is not updated.
Am 10.01.2010 11:42, schrieb André Somers:
Sorting is usually done using a intermediary QSortFilterProxyModel. Does
that work in your case?
André
*Van:* qt-interest-bounces at trolltech.com [
mailto:qt-interest-bounces at trolltech.com <qt-interest-bounces at trolltech.com>]
*Namens *Smokey McPott
*Verzonden:* zaterdag 9 januari 2010 14:26
*Aan:* qt-interest at trolltech.com
*Onderwerp:* [Qt-interest] QTableView is not updated after sort (Qt 4.6
Windows)
Hey people,
I've written a widget that contains a QTableView which has sorting enabled.
Now, when I click the header, the sort function of the model is called but
the view is not updated. When the view gets repainted, e.g. because I
minimize the application and bring it up again, the data are shown in the
desired (updated) way. I've observed the same behaviour in Qt 4.5 but I
couldn'd find any posts on the subject. In the source code for QTableView
most functions that change the contents of the view call
d->viewport->upate() or d->viewport->upate(rect). But the sortByColumn(int
column) function lacks a similar call. Bug or feature?
Regards
Sebastian
_______________________________________________
Qt-interest mailing
listQt-interest at trolltech.comhttp://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100110/b196a585/attachment.html
More information about the Qt-interest-old
mailing list