-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshadow.qml
40 lines (37 loc) · 863 Bytes
/
shadow.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
import QtQuick 2.0
import QtGraphicalEffects 1.0
Item {
width: 320;
height: 240;
Item {
id: container;
anchors.centerIn: parent;
width: rect.width + (2 * rectShadow.radius);
height: rect.height + (2 * rectShadow.radius);
Rectangle {
id: rect
width: 100;
height: 50;
color: "orange";
radius: 7;
antialiasing: true;
border {
width: 2;
color: "red";
}
anchors.centerIn: parent;
}
}
DropShadow {
id: rectShadow;
anchors.fill: source
cached: true;
horizontalOffset: 3;
verticalOffset: 3;
radius: 8.0;
samples: 16;
color: "#80000000";
smooth: true;
source: container;
}
}