[Interest] High-dpi fixing for Qt 5.5

Sorvig Morten Morten.Sorvig at theqtcompany.com
Thu Mar 26 16:03:33 CET 2015


> On 25 Mar 2015, at 17:21, John Weeks <john at wavemetrics.com> wrote:
> 
> It looks to me like at present (Qt 5.4) the various devicePixelRatio() functions on Windows only return 1.0 or 2.0. But Windows systems can be at fractional ratios- will 5.5 address that?
> 
> It also appears that drawing a QPixmap or QImage with a fractional ratio actually works, but we can't discover that situation easily.

I don’t think we can officially support fractional ratios, in the sense that we can’t guarantee glitch-free graphics. Qt currently has one central int-based API (QPaintDevice:: devicePixelRatio()) which limits fractional ratio support.

That said, my personal opinion is that we should add QPaintDevice::devicePixelRatioF() and take a "best effort” approach at making it work. No guarantees that it actually will in all cases, though.

Morten





More information about the Interest mailing list