Making a circular profile picture in QtCreator
Unsolved
QML and Qt Quick
-
I'm trying to develop a project and I have to make a profile picture that shows in a circle like the ones you normally see everywhere on a profile. Someone help me do that.
I knwo how to make a circle by making the radius of a rectangle half the width, my problem is fitting an image and clipping it so it doesn't appear outside the circle. How do I do that? -
@Gilberrt maybe this can help?
Item { id:circularImage anchors.fill: parent Rectangle { width: 500 height: 500 color: "#a2ecf5" radius: width/2 anchors.centerIn: parent Image { width: 350 height: 350 source: "image.png" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } } }
-
@Ronel_qtmaster Thanks for answering