From c76f938fe11141ce9299a5540d3e3d7749931996 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 15 Dec 2011 15:35:59 +0100 Subject: Connect to the moved signals in the header view. Change-Id: I6954f77ad7d02970f562abcbaf4e733c6d43ead5 Reviewed-by: David Faure --- src/widgets/itemviews/qheaderview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/widgets/itemviews') diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index d4edbb7bfa..cbc40367e3 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -370,6 +370,8 @@ void QHeaderView::setModel(QAbstractItemModel *model) this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); QObject::disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_layoutAboutToBeChanged())); } else { QObject::disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(sectionsInserted(QModelIndex,int,int))); @@ -377,6 +379,8 @@ void QHeaderView::setModel(QAbstractItemModel *model) this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); QObject::disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_layoutAboutToBeChanged())); } QObject::disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), this, SLOT(headerDataChanged(Qt::Orientation,int,int))); @@ -392,6 +396,8 @@ void QHeaderView::setModel(QAbstractItemModel *model) this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); QObject::connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); + QObject::connect(model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_layoutAboutToBeChanged())); } else { QObject::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(sectionsInserted(QModelIndex,int,int))); @@ -399,6 +405,8 @@ void QHeaderView::setModel(QAbstractItemModel *model) this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); QObject::connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); + QObject::connect(model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_layoutAboutToBeChanged())); } QObject::connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), this, SLOT(headerDataChanged(Qt::Orientation,int,int))); -- cgit v1.2.3