summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2017-11-17 20:57:00 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2017-12-17 12:42:22 +0000
commit93dabeba9dc5f6cbab60e65b3cc8df5fe48745a9 (patch)
treef7559898ac16d51660cfc6ec51a76626cb68d03c /src/widgets
parent9fbd9e066e6df19fef8eed77ec27c74124330c0a (diff)
QTreeView: Make sure QHeaderView is notified on layoutChanged()
QHeaderViewPrivate::_q_layoutChanged() was not called when used in a QTreeView because it was explicitly disconnected in setModel(). The disconnect was added sometime prio to Qt 4.3, but there the signal was connected to the doItemsLayout() slot. This was correct since QTreeView::doItemsLayout() is calling header->doItemsLayout(). In Qt 4.3.0 _q_layoutChanged() was introduced and the disconnect was adjusted. But since _q_layoutChanged() is doing much more than doItemsLayout() (e.g. restoring hidden sections), functionality was lost. The problem was already observed for Qt 4.6 (QTBUG-18196) but only partially fixed. Task-number: QTBUG-41124 Task-number: QTBUG-54610 Change-Id: Id13a9930d0163812e12a0287016bab9c3aa02068 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/itemviews/qtreeview.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index bbbadecff8..20e99d2aee 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -237,9 +237,6 @@ void QTreeView::setModel(QAbstractItemModel *model)
// QAbstractItemView connects to a private slot
disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
- // do header layout after the tree
- disconnect(d->model, SIGNAL(layoutChanged()),
- d->header, SLOT(_q_layoutChanged()));
// QTreeView has a public slot for this
connect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(rowsRemoved(QModelIndex,int,int)));