From c782ed3c48b31dc38b728947270df3fc3f3a7626 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Thu, 12 Apr 2018 20:45:35 +0200 Subject: QHeaderView: emit geometriesChanged() when the header is resized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/widgets/itemviews/qheaderview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/itemviews') diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 21245d38ce..e0cced8163 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -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(); -- cgit v1.2.3