Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. why FastBlur doesnt work?
Qt 6.12 LTS is out! See what's new in the release blog

why FastBlur doesnt work?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 757 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shokarta
    wrote on last edited by
    #1

    hello,
    i have this simple code which doesnt work with no idea why...

    import QtQuick 2.12
    import QtQuick.Controls 2.0
    import QtQuick.Controls.Styles 1.4
    import QtGraphicalEffects 1.12
    
    Item {
        id: parentObject
    
        property bool screenBlured: false
    	onSsreenBluredChanged: { console.log(screenBlured); }	// works fine, upon clicking on image, this changes to true
    
        FastBlur {
    		id: blur
            anchors.fill: parentObject // or should be testRect?
            source: parentObject // or should be  testRect?
            radius: screenBlured===true ? 32 : 0
    		onRadiusChanged: { console.log(blur.radius); }	// when screenBlured changes to true, this debug says "0" at the same time, even when it should say "32"
    
            Behavior on radius {
                NumberAnimation { duration: 500 }
            }
        }
    
        Rectangle {
            id: testRect
            anchors.fill: parent
    
            Image {
                id: scanImage
                anchors.centerIn: parent
                source: "images/scan.ico"
    
                MouseArea {
                    anchors.fill: parent
                    onClicked: { blured.screenBlured = true; }
                }
            }
        }
    }
    
    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Documentation clearly states:

      Note: It is not supported to let the effect include itself, for instance by setting source to the effect's parent.

      So you can't set the blur to fill parent object.

      (Z(:^

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved