How to enable hi-dpi support on Windows?
My app (built with Qt 5.7.1) looks perfect on a Retina MacBookPro. But it looks terrible on a hi-dpi Windows laptop. The fonts and icons are so tiny it is borderline unusable. Apparently the app did not detect the hi-dpi settings on Windows? So how do I fix it? Is it possible? I already turn on Qt::AA_EnableHighDpiScaling for application. Is there anything else I need to do to make the app work on hi-dpi screen under Windows?
I assume u found
"While the macOS style fully supports high-DPI, the Windows desktop style currently has some limitations with certain scale factors. In these cases, consider using the Fusion style instead, which aims to support high-DPI in all cases."
So you could try fiddling with the QT_SCALE_FACTOR
and see if change anything.
Thanks for your reply. But how am I supposed to know what QT_SCALE_FACTOR to set based on user's system settings? I noticed that 'Fusion' style suggestion , too. But to be honest I think it is kind of silly. I want the app to look native on Windows, not in some other 'style'. I'm just a little baffled that at this stage and age (Qt 5.7.1) Qt still can't handle hi-dpi correctly? Really? :-(
No no, just wanted you to play around and see if it can look good at all.
Qt is using the support of the platform and the result will/might vary.
Can we see a screen shot on window?
I wish i could tell you a easy fix but as far as i know there is none.
The problem is I don't have a hi-dpi Windows device to test by myself :-( I mainly develop on Mac and everything works well on Mac. I built a Windows version on a low-end PC to let other people use the app on Windows. But quite a few have complained that everything looks too tiny on hi-dpi devices, such as a Surface Pro tablet, or a hi-dpi laptop PC. I don't have a screenshot but I think the problem is clear. My Qt app does not recognize the hi-dpi/scaling settings on Windows. So it renders everything in full/native resolution. That's why the texts and icons look tiny.