[Development] Revisiting high-DPI configuration options

Morten Sorvig Morten.Sorvig at qt.io
Mon Jun 20 15:00:16 CEST 2016


> On 17 Jun 2016, at 14:54, Frank Hemer <frank at hemer.org> wrote:
> 
> Can you give a hint on what causes these glitches and how to avoid them?
> I'm not talking about general usage of fractional methods for painting here. 
> 
> For example when drawing to a pixmap (sized for the 'real' screen resolution) 
> and then updating just a sub-rectangle of this pixmap, for some (and really 
> only some) fractional scale factor values there are glitches around that sub-
> rectangle where the background color of the window shines through.
> What is causing this?

I have not analyzed these in detail, but my guess would be rounding errors
due to fractional coordinates. So you could look at the update code (in QPainter
or the paint engine) and make sure coordinates are rounded to _include_
partially covered pixels.

> 
> What is the reason for not aiming towards supporting fractional scale factors 
> on the long run? What is the real challenge here?
> 

Good question!

If you ask me I think the Qt project should move towards supporting this (taking
care to avoid maintenance traps such as the native styles). One of the challenges
is simply available time and resources for doing the work. But even today Qt Creator
at QT_SCALE_FACTOR=1.3 is a usable application.

Another reason to not spend time on it would be that integer is, or is going
to be, the dominating use case. Wayland and Apple is integer, so are most of
the Android device categories. For Windows and desktop in general there are
currently lots of fractional hardware and configurations.

Morten






More information about the Development mailing list