summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtreeview.cpp
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2017-12-28 13:10:19 +0000
committerJani Heikkinen <jani.heikkinen@qt.io>2018-01-05 08:22:30 +0000
commitd5a11a0ec206f6b9e7fd50b37717ca820d6ab98a (patch)
treef380303799a13e62e0f3718dee6f355324924d1f /src/widgets/itemviews/qtreeview.cpp
parent7e9460306bd4165663d6403db8a5f9faa2e3d86a (diff)
Revert "QTreeView: Make sure QHeaderView is notified on layoutChanged()"
It caused some sorting issues. This reverts commit 93dabeba9dc5f6cbab60e65b3cc8df5fe48745a9. Change-Id: Ie8c7f2d47885be6626ddb6284474a78dcf09cf33 Task-number: QTBUG-65478 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qtreeview.cpp')
-rw-r--r--src/widgets/itemviews/qtreeview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 73083773f5..4795d9f1b1 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -237,6 +237,9 @@ 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)));