QHeaderView: emit geometriesChanged() when the header is resized

When the QHeaderView is resized (e.g. due to setFixedWidth), the views
are not notified about it and the layout is not updated which leads to
a wrong painting. Therefore we have to listen for QEvent::Resize the
same way as when the font or style changes.

Task-number: QTBUG-67532
Task-number: QTBUG-34095
Change-Id: Id70daf083e0dddc2500d8e5aad47513266887a2c
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
bb10
Christian Ehrlicher 2018-04-12 20:45:35 +02:00
parent 84eb9b5e30
commit c782ed3c48
1 changed files with 1 additions and 0 deletions

View File

@ -2871,6 +2871,7 @@ bool QHeaderView::viewportEvent(QEvent *e)
}
return true; }
#endif // QT_CONFIG(statustip)
case QEvent::Resize:
case QEvent::FontChange:
case QEvent::StyleChange:
d->invalidateCachedSizeHint();