Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Viewing all articles
Browse latest Browse all 137

Image rounded corners in QML

$
0
0

To my surprise, the Image component has no radius property. I tried emulating the rounded corners by putting the image in a rounded Rectangle, but it does not clip the corners.

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"    }}

How can I create an image with rounded corners properly?


Viewing all articles
Browse latest Browse all 137

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>