Hi,
It does work. You are putting in wrong source and maskSource. Try this
import QtQuick 2.0
import QtGraphicalEffects 1.0
Item {
width: 300
height: 300
Rectangle
{
id: bug
width: parent.width
height: parent.height
color: "blue"
radius: width/2
}
Image {
id: mask
source: "http://qt.digia.com/Global/About Us/Qt_master_logo_CMYK_300dpi.png"
sourceSize: Qt.size(parent.width, parent.height)
visible:false
width: parent.width
height: parent.height
}
OpacityMask {
anchors.fill: mask
source: mask
maskSource: bug
}
}
↧










