diff options
Diffstat (limited to 'src/widgets/itemviews/qheaderview.cpp')
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index b7de69d63a..e9091ca1a2 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -2321,9 +2321,10 @@ void QHeaderView::initializeSections() if (stretchLastSection()) // we've already gotten the size hint d->maybeRestorePrevLastSectionAndStretchLast(); - //make sure we update the hidden sections + // make sure we update the hidden sections + // simulate remove from newCount to oldCount if (newCount < oldCount) - d->updateHiddenSections(0, newCount-1); + d->updateHiddenSections(newCount, oldCount); } } |