[Interest] How are High DPI Icons supposed to work?
Hamish Moffatt
hamish at risingsoftware.com
Mon Sep 28 02:43:20 CEST 2015
On 25/09/15 21:19, Julius Bullinger wrote:
>
> Dear List,
>
> is there any clear and concise How To for High DPI icons/pixmaps? I
> gathered some information from several Wiki pages, Blog posts and
> documentation pages [1-7], but no luck.
>
Your code looks ok. You didn't say what the problem was?
> QPixmap pixmap2x(":/icons/48x48/icon at 2x.png");
> pixmap2x.setDevicePixelRatio(2);
You don't need to set the DPR manually, QPixmap will set it when it sees
the @2x in the filename.
Hamish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150928/444c009a/attachment.html>
More information about the Interest
mailing list