I have a laptop with 15" 4k screen (pixel ratio is 3) and external Full HD 23" display (pixel ratio is 1). I configured the Display Settings of the OS to use only external display when it is connected and to use 250% scaling for the 4k display.
So, if I launch an application and then connect or disconnect the external display, all applications get moved to a screen with different DPI. This results in wrong sizes for some widgets in fonts. I see from logs, that application uses dpiawareness = 2 which is default.
I compiled the Validator example from the Qt distribution. I attached screenshots for application started at low DPI and at high DPI screen and what application looks like after move to high and low DPI screen (by connecting/disconnecting the external display).
Steps to reproduce:
- Connect HIgh DPI Monitor to Laptop
- In display settings, toggle Mode from "Show only on1"/"Show only on2"