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/qheaderview.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/qheaderview.cpp')
-rw-r--r-- | src/gui/itemviews/qheaderview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 5128b64..eb3db21 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -2037,7 +2037,7 @@ bool QHeaderView::event(QEvent *e) updateSection(d->hover); } break; } - case QEvent::Timer: { // ### reimplement timerEvent() instead ? + case QEvent::Timer: { QTimerEvent *te = static_cast<QTimerEvent*>(e); if (te->timerId() == d->delayedResize.timerId()) { d->delayedResize.stop(); @@ -2610,7 +2610,7 @@ void QHeaderView::updateGeometries() Q_D(QHeaderView); d->layoutChildren(); if (d->hasAutoResizeSections()) - resizeSections(); + d->doDelayedResizeSections(); } /*! |