lena_pi/LenaPi/NavigationListDelegate.qml
2018-10-19 20:22:25 +02:00

35 lines
813 B
QML

import QtQuick 2.0
import QtGraphicalEffects 1.0
Rectangle{
id: container
property var model
property alias imageSource: contentImage.source
width: 100
height: width
radius: model.pIsCircleDelegate ? width/2 : 0
color: "blue"
Image{
id: contentImage
source: model ? model.pImageSource : "file:///home/ar/source/LenaPi/pics/benjamin.jpeg"
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();
console.log("circle clicked")
}
}
}