Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] Refresh blur effect
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Refresh blur effect

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 2.0k 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.
  • strahlexS Offline
    strahlexS Offline
    strahlex
    wrote on last edited by
    #1

    Hello,

    I wanto to create a effect for a backgroundImage. The images can change so it is necessary that the blur effect is reapplied. However the QML blur effects seems to be refreshed only on creation time. Is there a way to force refreshing the blur effect?

    Feel free to check out my website machinekoder.com
    and my pet projects Intellicute and QtQuickVcp

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      If you are using things like FastBlur and friends, they can be controlled simply by using NumberAnimation, so you have full control over when the animation should run.

      It's hard to be more specific without more details from your side.

      (Z(:^

      1 Reply Last reply
      0
      • strahlexS Offline
        strahlexS Offline
        strahlex
        wrote on last edited by
        #3

        @Image {
        property bool effectEnabled: true

                id: backgroundImage
                anchors.fill: parent
                source: master.backgroundImage
        
                GaussianBlur {
                    id: backgroundBlur
        
                    anchors.fill: parent
                    visible: parent.effectEnabled
                    source: parent
                    radius: 8
                    samples: 16
                    transparentBorder: false
                }
        

        }@
        When I change the master.backgroundImage the blur effect does not update. What do you mean by using the NumberAnimation on the blur effect?

        Feel free to check out my website machinekoder.com
        and my pet projects Intellicute and QtQuickVcp

        1 Reply Last reply
        0
        • L Offline
          L Offline
          laureon
          wrote on last edited by
          #4

          Try like this...
          @
          Image {
          id: myImage
          property bool effectEnabled: true

          id: backgroundImage
          anchors.fill: parent
          source: master.backgroundImage
          }

          GaussianBlur {
          id: backgroundBlur

          anchors.fill: myImage
          visible: myImage.effectEnabled
          source: myImage
          radius: 8
          samples: 16
          transparentBorder: false
          }
          @

          if it doesn't work put you image inside a loader that it will do the trick...

          1 Reply Last reply
          0
          • strahlexS Offline
            strahlexS Offline
            strahlex
            wrote on last edited by
            #5

            Thank you. I tried everything expect moving the Blur outside the Image Component that seems to fix the problem.

            Feel free to check out my website machinekoder.com
            and my pet projects Intellicute and QtQuickVcp

            1 Reply Last reply
            0

            • Login

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