summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qheaderview.cpp4
-rw-r--r--src/gui/itemviews/qtableview.cpp7
-rw-r--r--src/gui/itemviews/qtreeview.cpp6
3 files changed, 5 insertions, 12 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();
}
/*!
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();
}
/*!
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 37168eb..1145235 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -2524,8 +2524,7 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
d->viewItems[parentItem].hasChildren = true;
d->updateChildCount(parentItem, delta);
- updateGeometries();
- viewport()->update();
+ d->doDelayedItemsLayout();
} else if ((parentItem != -1) && d->viewItems.at(parentItem).expanded) {
d->doDelayedItemsLayout();
} else if (parentItem != -1 && (d->model->rowCount(parent) == end - start + 1)) {
@@ -3780,8 +3779,7 @@ void QTreeViewPrivate::rowsRemoved(const QModelIndex &parent,
}
}
if (after) {
- q->updateGeometries();
- viewport->update();
+ doDelayedItemsLayout();
} else {
//we have removed items: we should at least update the scroll bar values.
// They are used to determine the item geometry.