[Interest] Blur part of rectangle possible?

Josh Faust jfaust at suitabletech.com
Thu Feb 6 00:52:14 CET 2014

> 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,
    width: sourceRect.width
    height: sourceRect.height
    visible: false

  GaussianBlur {
    anchors.fill: effect_source
    source: effect_source
    radius: 15
    samples: 32

[image: Inline image 1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140205/bf66d6b9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 66140 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140205/bf66d6b9/attachment.png>

More information about the Interest mailing list