Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.1
Description
Sample attached. 2 monitors with different scaling, e.g. main screen at 100% and secondary at 150% respectively, Reproducible with 6.5.1. And implicitly, QA::AA_EnableHighDpiScaling is true by default.
Steps to reproduce:
1. Run the example and a window pops up. Right click inside the main window so that menu pops up.
2. Move mouse cursor to whichever SubMenu. The sub menu layout looks normal on 100% screen. But looks clipped on 150% screen at the first place. Unless you move cursor away and back again. The sub menu looks normal at the second time.
3. If QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor); is commented out (so that only QA::AA_EnableHighDpiScaling is in effect), then everything looks OK.
If main screen has larger scaling factor, e.g. main at 150% and secondary at 100%, the sub menu looks expanded. Please refer to the 4 screenshots. 'main4k250' and 'secondaryHD100' are from original reporter. I don't have 4K monitor so I only tested with 2 HD monitors. The result is shown by 'mainHD100' and 'secondaryHD150'.
Is it because QA::AA_EnableHighDpiScaling is not compatible with RoundingPolicy? Or some other reasons?