blob: 18258676b43eb7c238307d6ee2412f95dfe6c061 (
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
47
48
49
50
51
52
53
54
|
import QtQuick
import Test 1.0
Item {
width: 300
height: 300
Rectangle {
objectName: "outerViewport"
x: 40
y: 40
width: 220
height: 220
border.color: "green"
color: "transparent"
Rectangle {
objectName: "innerViewport"
width: parent.width
height: parent.height
x: 20
y: 20
border.color: "cyan"
color: "transparent"
Rectangle {
objectName: "innerRect"
color: "wheat"
opacity: 0.5
x: -55
y: -55
width: 290
height: 290
ViewportTestItem {
anchors.fill: parent
Rectangle {
id: viewportFillingRect
color: "transparent"
border.color: "red"
border.width: 3
x: parent.viewport.x
y: parent.viewport.y
width: parent.viewport.width
height: parent.viewport.height
}
}
}
}
}
Text {
text: "viewport " + viewportFillingRect.width + " x " + viewportFillingRect.height
}
}
|