Windows 10 HighDPI support recommend practice
mireiner last edited by mireiner
today we got computers and monitors that support different graphic resolutions and Windows 10 supports scaling factors of 100%, 125%, 150%, 175%, 200% and so on.
Windows 10 itself and many commercial native WIndows applications are Per-Monitor DPI aware and scale automatically very well along these differnet resolutions and Windows fractional scaling factors (menus and control elements sizes).
As far as I know QT Windows desktop applications are able to automatically scale menus in fractionial scaling factors the same good. But controls like buttons, listboxes and comboxboxes, text edit controls etc.. can only be automatically scaled sharply without blur in full number scaling sizes 1x and 2x. For example UI control elements that were designed in Qt Designer.
So how to make a Qt Windows desktop application Per-Monitor DPI aware and scale its control elements properly to make it look good without blur in any monitor resolution (1080p, 2k and 4k) and Windows fractional scaling factors?
I can only think of solutions that sounds like nightmares to my ears, because of the amount of work it needs to do so:
- Detect the graphics/monitor resolution at application startup.
2a. Create every control element and dialog box etc. dynamically at run time in different size for different graphic resolutions and Windows scaling factors.
2b. Design multiple UI's (control elements and dialog boxes etc.) in Qt Designer in multiple sizes for every graphic resolution and Windows scaling factor. And then load the one that fits best at application runtime (if that's possible).
Are there other solutions? What is the best practice or recommended way to handle this problem?