Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.3.0
-
None
-
Windows 10, High DPI display, scaling at 250% (fractional)
Description
Took me a while to isolate the issue into a MCVE, but I finally figured it out and hosted a very short code sample with explanations and images in the README here: https://github.com/jmarrec/QtTestbed/tree/main/Test-Combobox-Popup-Issue
Here's the bottom line:
- Combobox popup position issue
- Windows 10 (21H2) (Mac is not affected)
- High DPI display
- Set Display Scaling to 250% (fractional)
- Use `QApplicationn:setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor)`
- Move the main window to the left of the screen: popup is ok, it aligns (see Image *left.png*)
- Move the main window to the right of the screen: it gets an offset that gets worse and worse (see *right.png*)
- Now try with 200% scaling: it works fine (see *right_200pct.png*)
Note:
- if I start the application at 200%, then switch to 250% while it's running, then it works fine
- If I use `Qt::HighDpiScaleFactorRoundingPolicy::PassThrough` at 250% it doesn't exhibit the issue