From d5a11a0ec206f6b9e7fd50b37717ca820d6ab98a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Thu, 28 Dec 2017 13:10:19 +0000 Subject: Revert "QTreeView: Make sure QHeaderView is notified on layoutChanged()" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It caused some sorting issues. This reverts commit 93dabeba9dc5f6cbab60e65b3cc8df5fe48745a9. Change-Id: Ie8c7f2d47885be6626ddb6284474a78dcf09cf33 Task-number: QTBUG-65478 Reviewed-by: Thorbjørn Lund Martsum Reviewed-by: Christian Ehrlicher Reviewed-by: Friedemann Kleint Reviewed-by: Richard Moe Gustavsen --- src/widgets/itemviews/qtreeview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/widgets/itemviews') 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))); -- cgit v1.2.3