Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.3, 5.15.0
-
None
-
Windows 10 1809 Pro x64
Qt 5.12.3 MSVC 2017 x64, Qt 5.12.3 mingw 7.3 x64
Description
QLabel::setFont() has different behavior depending on how and when it called. It works correctly only after selecting font using QFontDialog, in other cases (font was deserialized from config, for example) - it looses some font attributes even these attributes are present in deserialized font.
Applying deserialized font (read from config) from constructor looses `styleName` font attribute, but doing the same on button click (but NOT doing it from constructor, i.e. label has default font) lead to visually correct effect, but QLabel::font() reports NO styleName field set...
see comments in attached sample app and screenshots.