[Development] High-dpi Qt best practices

Sorvig Morten Morten.Sorvig at digia.com
Tue Oct 9 11:46:37 CEST 2012


On Oct 9, 2012, at 11:32 AM, Olivier Goffart <olivier at woboq.com>
 wrote:
> But QSize is already the size in pixel.
> Or do you mean that QIcon::pixmap could return a pixmap that is larger than 
> the given QSize, scaled with some magic heuristics.  That is not really 
> intuitive. (and violate the current documentation)
> 

I'm re-defining it to be the size in points. I think this intuitive, you are asking QIcon::pixmap() for pixmap suitable for covering this many units on screen - not for a pixmap of a specific size.

This is a behaviour change that breaks existing code (in applications and in Qt), so it's opt-in via QT_HIDPI_AWARE. 

Morten


More information about the Development mailing list