From f3a4b4258f2d207b5a8e73d62822a3afe1bf8a72 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 14 Feb 2017 12:44:13 +0100 Subject: [PATCH] QWidget: update the font when the screen is changed The screen may change the dpi so the font dpi is also changed. We must tell QWidget that the font has changed by sending the FontChanged event to all sub widgets so they can update their geometry. Task-number: QTBUG-48242 Change-Id: Ibcdcc0c96429b8cd16311928298294f47a23e816 Reviewed-by: Friedemann Kleint Reviewed-by: Shawn Rutledge Reviewed-by: Marc Mutz --- src/widgets/kernel/qwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index dc55c2d5d9..2cb259468d 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -9191,6 +9191,7 @@ bool QWidget::event(QEvent *event) const QWindow *win = te->window; d->setWinId((win && win->handle()) ? win->handle()->winId() : 0); } + d->updateFont(d->data.fnt); #ifndef QT_NO_OPENGL d->renderToTextureReallyDirty = 1; #endif