[Interest] iOS retina @3x

maitai maitai at virtual-winds.org
Wed Aug 19 10:08:22 CEST 2015


Hello,

I am in the process of upgrading our icons to accommodate retina 
display, especially on iOS.

For this purpose, I have created artwork at different sizes, for 
instance

arrow_left.png (32x32)
arrow_left at 2x.png (64x64)
arrow_left at 3x.png (96x96)

I changed the color of each image in order to see which one is actualy 
loaded, and I do have 
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);

then I just use QIcon myIcon("arrow_left.png");

When I run this on iPhone 6 emulator, I can see that the @2x is loaded 
as expected, very nice. But when I do the same on iPhone 6+ emulator, 
the @2x is loaded too, where I was expecting the @3x version to be 
used... The system reports 3 for devicePixelRatio as expected, but still 
qt is choosing the 2x version.

So the question is: @3x is also supported for QIcon in qt 5.5.0/iOS or 
it should work and I am doing something wrong?

Thanks
Philippe Lelong




More information about the Interest mailing list