[Interest] Mac with Retina Display - Look is "Pixilated" with Qt-5.4.2
Hamish Moffatt
hamish at risingsoftware.com
Tue Jul 28 06:28:17 CEST 2015
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
More information about the Interest
mailing list