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

Opacity Mask not working as expected

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 5.11
    • None

      the following code does not punch a hole in the source item

      import QtQuick 2.10
      import QtQuick.Window 2.2
      import QtQuick.Shapes 1.0
      import QtGraphicalEffects 1.0
      
      Window {
          visible: true
          width: 640
          height: 480
          id: root
          color: "green"
      
          Item {
              id: i
              width: parent.width * 0.2
              height: width
              anchors.right: parent.right
              anchors.top: parent.top
      
              Rectangle {
                  id: a
                  visible: false
                  anchors.fill: parent
                  color: 'blue'
              }
      
              Rectangle {
                  id: d
                  anchors.centerIn: parent
                  width: parent.width * 0.5
                  height: parent.height * 0.5
                  visible: false
                  color: "firebrick"
                  opacity: 1.0
              }
      
      
              OpacityMask {
                  visible: true
                  anchors.fill: a
                  source: a
                  maskSource: d
              }
          }
      }
      

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

            sletta Gunnar Sletta
            paangele Paolo Angelelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes