[Development] Qt for iOS: Management Retina vs Non-Retina Images
Robert Iakobashvili
coroberti at gmail.com
Wed Oct 8 10:26:25 CEST 2014
On Wed, Oct 8, 2014 at 11:10 AM, Ziller Eike
<Eike.Ziller at theqtcompany.com> wrote:
>
> On Oct 8, 2014, at 9:18 AM, Robert Iakobashvili <coroberti at gmail.com> wrote:
>
>> On Wed, Oct 8, 2014 at 10:03 AM, Ziller Eike
>> <Eike.Ziller at theqtcompany.com> wrote:
>>>
>>> On Oct 6, 2014, at 1:59 PM, Robert Iakobashvili <coroberti at gmail.com> wrote:
>>>
>>>> Gentlemen,
>>>> If images are placed to resource file,
>>>> is there any option for an automatic management
>>>> of using either Retina or non-Retina images
>>>> using Apple's naming convention or the manual
>>>> management is the only option like for Mac OS X?
>>>>
>>>> Here's an example of what Qt developers
>>>> are doing:
>>>> http://qt-project.org/forums/viewthread/44805/
>>>>
>>>> Are there any other approaches or
>>>> best practices?
>>>
>>>
>>> Just use
>>>
>>> Image {
>>> source: “foo.png”
>>> }
>>>
>>> and it will try “foo at 2x.png” on 2x screens on OS X and iOS automatically.
>>>
>>> Br, Eike
>>>
>>
>> Thank you for your response.
>> This is a widget-based application, though.
>
> QIcon does automatic loading of @2x images afair. QPixmap and QImage only set the devicePixelRatio corresponding to the file name automatically, but you have to define yourself if you want to load a @2x or not.
>
> Br, Eike
>
QIcon could be useful. This is helpful.
Thank you.
Kind regards,
Robert
More information about the Development
mailing list