forked from andreagen0r/qmlRoundImage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
42 lines (36 loc) · 895 Bytes
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import QtQuick
import QtQuick.Window
import QtQuick.Controls
Window {
width: 640
height: 580
visible: true
title: qsTr("Round Image")
Rectangle {
anchors.fill: parent
color: "lightgray"
Label {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.margins: 10
text: "Photo by Mahdi Bafande on Unsplash"
}
Column {
anchors.centerIn: parent
spacing: 10
RoundImage {
width: 400
height: width
source: "qrc:/image/mahdi-bafande-qgJ1rt7TeeY-unsplash.jpg"
edge: slider.value
}
Slider {
id: slider
width: parent.width
from: 0
to: 1
value: 1
}
}
}
}