[Interest] How is QT_AUTO_SCREEN_SCALE_FACTOR supposed to work?

Sorvig Morten Morten.Sorvig at theqtcompany.com
Mon Nov 2 13:27:10 CET 2015


> On 02 Nov 2015, at 09:56, Johan <kungjohan at gmail.com> wrote:
> 
> But when I try to use QT_AUTO_SCREEN_SCALE_FACTOR and set it to 1 nothing happens. Should not this equal setting QT_SCALE_FACTOR to 2 since I have set Windows to display in 200%?

Yes, I think it should.

> Any hints on how to debug this?

Try looking at QHighDpiScaling::initHighDpiScaling() and  QHighDpiScaling::updateHighDpiScaling(). The latter should eventually make a call to QWindowsScreen:: pixelDensity() which I would expect to return 2 in your case.

Morten


More information about the Interest mailing list