blob: 0e3c628585d62239a61efc4e8c04a45323bb6c5c (
plain)
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
43
44
45
46
|
// Copyright (C) 2014 Gunnar Sletta <gunnar@sletta.org>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick 2.0
Item {
width: 300
height: 200
Row {
height: 100
anchors.centerIn: parent
spacing: 50
//! [non-layered]
Item {
id: nonLayered
opacity: 0.5
width: 100
height: 100
Rectangle { width: 80; height: 80; border.width: 1 }
Rectangle { x: 20; y: 20; width: 80; height: 80; border.width: 1 }
}
//! [non-layered]
//! [layered]
Item {
id: layered
opacity: 0.5
layer.enabled: true
width: 100
height: 100
Rectangle { width: 80; height: 80; border.width: 1 }
Rectangle { x: 20; y: 20; width: 80; height: 80; border.width: 1 }
}
//! [layered]
}
}
|