[Development] Image and PreserveAspectCrop

Ben Lau xbenlau at gmail.com
Wed Aug 3 05:26:17 CEST 2016


On 2 August 2016 at 19:56, Gunnar Sletta <gunnar at sletta.org> wrote:

> Hi,
>
> I think the most sensible solution is to handle this inside the image
> provder. When I've seen this problem previously, it has was solved using a
> custom image provider for local files, but as you say, when the resources
> are scattered across the local and network alike, then you want the default
> internals to handle it correctly.
>
> So I agree with you that "Solution" is the way forward, rather than A or B
> :)
>
> I suspect the behavioural change won't be that big a deal, as it will in
> fact show up only as a slightly sharper image.
>
> A bit unfortunate that we have to add a V2 version of the image provider,
> though. Would be nice if we could extend what is already there somehow.
> However you end up solving it, it needs to be a bit more flexible than what
> you do in the proposed patch, as you also have to cover PreserveAspectFit.
> Perhaps using some flags as the last parameter there instead of a bool so
> we keep it open to add other states later on without having to introduce a
> new class.
>
> cheers,
> Gunnar
>
>
Beside a V2 image provider, how about having QImage support in Image item
directly? I think that would solve a lots of problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160803/78254ad0/attachment.html>


More information about the Development mailing list