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

OpacityMask does not work with source item rotation animation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.1
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      If take the OpacityMask example: https://doc.qt.io/qt-5/qml-qtgraphicaleffects-opacitymask.html :

       

      import QtQuick 2.12
      import QtGraphicalEffects 1.12
      
      Item {
          width: 300
          height: 300
      
          Image {
              id: bug
              source: "images/bug.jpg"
              sourceSize: Qt.size(parent.width, parent.height)
              smooth: true
              visible: false
          }
      
          Image {
              id: mask
              source: "images/butterfly.png"
              sourceSize: Qt.size(parent.width, parent.height)
              smooth: true
              visible: false
          }
      
          OpacityMask {
              anchors.fill: bug
              source: bug
              maskSource: mask
          }
      }
      

       

      And try to add the rotation animation on the bug item:

          Image {
              id: bug
              source: "images/bug.jpg"
              sourceSize: Qt.size(parent.width, parent.height)
              smooth: true
              visible: false
              RotationAnimator on rotation {
                  from: 0;
                  to: 360;
                  duration: 5000
              }
          }
      

      then nothing happens, the resulting image stays as static (as if the source is motionless).

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.graphics.and.multimedia Qt Graphics Team
            Reporter:
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes