summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-13 15:40:20 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-13 15:53:41 (GMT)
commit6420f43f30e2d5cf7ae74702f96c176d7bf22a84 (patch)
tree9635542cb598ff74a421f9d657b9444de21d989c /src/gui
parent9c04890642f9836fe25289d91a470cdd2de4e183 (diff)
downloadQt-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')
-rw-r--r--src/gui/itemviews/qtableview.cpp3
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);
}
/*!