diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-02-14 12:44:13 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2017-02-20 12:48:34 +0000 |
commit | f3a4b4258f2d207b5a8e73d62822a3afe1bf8a72 (patch) | |
tree | df1b026ccca730892070c378bc1d5483407e0107 /src/widgets/kernel | |
parent | 7057b19b89e164f1698b72a338e532b935e199e9 (diff) |
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 <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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 |