[Interest] Blur part of rectangle possible?

Mark Gaiser markg85 at gmail.com
Thu Feb 6 01:28:21 CET 2014


On Thu, Feb 6, 2014 at 12:52 AM, Josh Faust <jfaust at suitabletech.com> wrote:

>
>> I've tried that. You get quite funny results :)
>> But in reality having your full ListView crammed into a small version
>> isn't looking good. The intention is to blur just a small part of the
>> listview and doing this trick makes it look very wrong and out of
>> place.
>>
>
> I'm not sure what you mean -- with the right parameters, it should draw
> just the part of the ListView you want. For example, this works:
>
> import QtQuick 2.1
> import QtGraphicalEffects 1.0
>
> Item {
>   width: 640
>   height: 480
>
>   Image {
>     id: img
>     source: "https://www.google.com/images/srpr/logo11w.png"
>   }
>
>   ShaderEffectSource {
>     id: effect_source
>     anchors {
>       bottom: img.bottom
>       left: img.left
>       right: img.right
>     }
>     hideSource: false
>     sourceItem: img
>     sourceRect: Qt.rect(0, img.height - img.height/2, img.width,
> img.height/2)
>     width: sourceRect.width
>     height: sourceRect.height
>     visible: false
>   }
>
>   GaussianBlur {
>     anchors.fill: effect_source
>     source: effect_source
>     radius: 15
>     samples: 32
>   }
> }
>

I think i misunderstood you since the example you posted seems to be
exactly the kind of thing i was looking for :D
Will try this out right away!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140206/47f5fc7c/attachment.html>


More information about the Interest mailing list