diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-13 15:40:20 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-13 15:53:41 (GMT) |
commit | 6420f43f30e2d5cf7ae74702f96c176d7bf22a84 (patch) | |
tree | 9635542cb598ff74a421f9d657b9444de21d989c /src/gui/itemviews/qtableview.cpp | |
parent | 9c04890642f9836fe25289d91a470cdd2de4e183 (diff) | |
download | Qt-6420f43f30e2d5cf7ae74702f96c176d7bf22a84.zip Qt-6420f43f30e2d5cf7ae74702f96c176d7bf22a84.tar.gz Qt-6420f43f30e2d5cf7ae74702f96c176d7bf22a84.tar.bz2 |
Fix sorting after changing a QTableView's header
Keep the sorting states in sync with the header when
setting custom headers
Reviewed-by: Gabriel
Task-number: QTBUG-3128
task-number: 234926
Diffstat (limited to 'src/gui/itemviews/qtableview.cpp')
-rw-r--r-- | src/gui/itemviews/qtableview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 2d98258..a610b73 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -1117,6 +1117,9 @@ void QTableView::setHorizontalHeader(QHeaderView *header) connect(d->horizontalHeader, SIGNAL(sectionHandleDoubleClicked(int)), this, SLOT(resizeColumnToContents(int))); connect(d->horizontalHeader, SIGNAL(geometriesChanged()), this, SLOT(updateGeometries())); + + //update the sorting enabled states on the new header + setSortingEnabled(d->sortingEnabled); } /*! |