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>
This commit is contained in:
Olivier Goffart 2017-02-14 12:44:13 +01:00 committed by Olivier Goffart (Woboq GmbH)
parent 7057b19b89
commit f3a4b4258f

View File

@ -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