[Interest] Mac with Retina Display - Look is "Pixilated" with Qt-5.4.2

Robert Iakobashvili coroberti at gmail.com
Tue Jul 28 07:04:23 CEST 2015


On Tue, Jul 28, 2015 at 7:28 AM, Hamish Moffatt
<hamish at risingsoftware.com> wrote:
> On 26/07/15 20:04, Robert Iakobashvili wrote:
>> It's a QWidget-based application.
>>
>> After adding to Info.plist
>>
>> <key>NSHighResolutionCapable</key>
>> <true/>
>> <key>NSPrincipalClass</key>
>> <string>NSApplication</string>
>>
>> on a good side all texts and fonts are looking great in the created by
>> Quartz Debug
>> HDPI Display with double resolution.
>>
>> However, on a bad site I do not see any improvements in how images are looking.
>>
>> All images are located in resource file with appropriate @2x for
>> double resolution
>> images and they are used for QIcon constructor by passing their rsc locations.
>>
>> qApp->devicePixelRatio() was checked to be 2.0
>>
>> The look of images is not changes/improves even if the names of
>> the 2x images are passed explicitly. They are loaded, but still not looking
>> differently from 1x.
>>
>> Am I missing something about Quartz settings or capabilities?
>>
>> Thanks,
>>
>
> You may also need to do
>
> qApp->setAttribute(Qt::AA_UseHighDpiPixmaps);
>
> shortly after creating your QApplication, to get the @2x images used.
>
> Hamish


Yes, it works! You are the best.

Thank you very much.

Sincerely,
Robert



More information about the Interest mailing list