QHeaderView:setDefaultSectionSize add invalidateCachedSizeHint call

We cannot rely on the previous sizeHint and we also call it
in QHeaderView::resizeSection(). There seems to be no reason
not to call it.

Change-Id: Ia473fb7163369aafa5c019ff97a030f9f54a33d9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Thorbjørn Lund Martsum 2012-11-12 06:48:34 +01:00 committed by The Qt Project
parent 37eb61677c
commit 79fcb97be5
1 changed files with 1 additions and 0 deletions

View File

@ -3370,6 +3370,7 @@ void QHeaderViewPrivate::cascadingResize(int visual, int newSize)
void QHeaderViewPrivate::setDefaultSectionSize(int size)
{
Q_Q(QHeaderView);
invalidateCachedSizeHint();
defaultSectionSize = size;
for (int i = 0; i < sectionItems.count(); ++i) {
QHeaderViewPrivate::SectionItem &section = sectionItems[i];