diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2010-02-26 15:57:38 (GMT) |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2010-03-04 11:44:57 (GMT) |
commit | cd2afafbc9c29393a80d415145c49eb5f439da55 (patch) | |
tree | 4be298d809e6a15c8bcd4cdf2879a82487f5de3a /src/gui/itemviews/qtableview.cpp | |
parent | 8bc0456491e5a7e1fc677fce6e76932ab0d923e8 (diff) | |
download | Qt-cd2afafbc9c29393a80d415145c49eb5f439da55.zip Qt-cd2afafbc9c29393a80d415145c49eb5f439da55.tar.gz Qt-cd2afafbc9c29393a80d415145c49eb5f439da55.tar.bz2 |
Delay the resize section for better performance.
This was particularly unusable when combining a QSortFilterProxyModel
with resize mode ResizeToContents.
Task-number: QTBUG-8540
Reviewed-by: Thierry
Diffstat (limited to 'src/gui/itemviews/qtableview.cpp')
-rw-r--r-- | src/gui/itemviews/qtableview.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 3111896..bdc1205 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -1960,12 +1960,7 @@ QModelIndexList QTableView::selectedIndexes() const void QTableView::rowCountChanged(int /*oldCount*/, int /*newCount*/ ) { Q_D(QTableView); - updateGeometries(); - if (verticalScrollMode() == QAbstractItemView::ScrollPerItem) - d->verticalHeader->setOffsetToSectionPosition(verticalScrollBar()->value()); - else - d->verticalHeader->setOffset(verticalScrollBar()->value()); - d->viewport->update(); + d->doDelayedItemsLayout(); } /*! |