The font sizes occasionally end up way too large or way too small considering the scale factor on Windows. This seems to occur especially after changes to scale factor and/or if different displays have different scale factors.
For example if the main display scale factor is increased above recommended the font sizes seem to decrease on all monitors. This affects even Qt applications started after the change.
Alternatively closing internal display of a laptop might throw the font sizes off in Qt applications on an external display.
This kind of behavior can be reproduced with Qt Creator as well as Qt examples such as "examples/mainwindows/application".
Way to reproduce:
1) Set the scaling of the display to 125 or 150% and make sure that this display is the main display
2) Build and run the attached example with Qt 5.15.6
3) The Text size of the buttons should be the same but they aren't.
4) If multiple displays are used and the scaling of the additional display is set to 100%, moving the button 2 to the additional window makes the text unreadable.
This issue is not evident in the Qt 6.2.0.
This issue is not evident with QMessageBox.
Explicitly setting the point size seems to fix the issue.
Also running app with: -platform windows:dpiawareness=1 at least alleviates the issue.