Cantos arredondados da imagem no QML
Para minha surpresa, oImage
componente não temradius
propriedade. Tentei emular os cantos arredondados colocando a imagem em umRectangle
, mas não corta os cantos.
Rectangle {
anchors.right: rectContentBg.left
anchors.top: rectContentBg.top
anchors.margins: 8
radius: 8
width: 64
height: 64
Image {
id: imgAuthor
opacity: 1
smooth: false
anchors.fill: parent
source: "qrc:/res/sample_avatar.jpg"
}
}
Como posso criar uma imagem com cantos arredondados corretament