import QtQuick 2.0 import QtGraphicalEffects 1.0 Rectangle{ id: container property var model property alias imageSource: contentImage.source width: height height: 150 radius: model.pIsCircleDelegate ? height/2 : 0 color: "blue" Image{ id: contentImage source: model ? model.pImageSource : "qrc:/default_image" anchors.centerIn: parent width: parent.width-10 height: width fillMode: Image.PreserveAspectCrop layer.enabled: true layer.effect: OpacityMask{ maskSource: container } } MouseArea{ id: controlObject anchors.fill: parent onClicked:{ model.onClicked(); } } }