Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138348

Weird effect on MultiEffect and NumberAnimation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 6.8.2, 6.9.1
    • None
    • Linux/X11

      Have following item:

       

      Item {
          id: item
      
          MultiEffect {
              anchors.fill: item
              source: item
              shadowEnabled: true
              shadowColor: "#9B9B9B"
              shadowBlur: 1.0
              shadowHorizontalOffset: 8
              shadowVerticalOffset: 8
          }
      
          ProgressBar {
              background: Rectangle {
              }
              contentItem: Item {
                   Rectangle {
                   }
              }
      
              NumberAnimation on value {
                  running: item.visible
                  from: 0.0
                  to: 1.0
                  duration: dismissTimeout
                  onFinished: {
                  }
              } // NumberAnimation 
          }
      }

      Shadow on `MultiEffect` worked ok until I added `NumberAnimation` to the `ProgressBar.value` which is completely unrelated to it. After that shadow offsets increased in several times and other strange screen artefacts appeared.

      Original shadow:

      After animation added:

      Forced to switch to RectangularGlow for now which works fine with the animation.

      Full code: Main.qml

      To reproduce set timed property to true to enable animation.

      Another bug: uncomment line 113: 

      // background: Rectangle { color: "transparent" }

      shadow disappears at all.

       

        1. image-2025-07-07-22-45-37-875.png
          19 kB
          Aleksey Kontsevich
        2. image-2025-07-07-22-46-30-186.png
          25 kB
          Aleksey Kontsevich
        3. Main.qml
          5 kB
          Aleksey Kontsevich
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            alekseyka Aleksey Kontsevich
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes