summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
blob: d6cf4de9c11f776f81b67c3485a18722c6dc6035 (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
import Qt 4.7
import Qt.widgets 4.7

QGraphicsWidget {
    geometry: "20,0,600x400"
    layout: QGraphicsLinearLayout {
        orientation: Qt.Horizontal
        QGraphicsWidget {
            layout: QGraphicsLinearLayout {
                spacing: 10; orientation: Qt.Vertical
                LayoutItem {
                    QGraphicsLinearLayout.stretchFactor: 1
                    QGraphicsLinearLayout.spacing: 1
                    objectName: "left"
                    minimumSize: "100x100"
                    maximumSize: "300x300"
                    preferredSize: "100x100"
                    Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
                }
                LayoutItem {
                    QGraphicsLinearLayout.stretchFactor: 10
                    QGraphicsLinearLayout.spacing: 10
                    objectName: "left"
                    minimumSize: "100x100"
                    maximumSize: "300x300"
                    preferredSize: "100x100"
                    Rectangle { objectName: "yellowRect"; color: "blue"; anchors.fill: parent }
                }
            }
        }
        QGraphicsWidget {
            layout: QGraphicsLinearLayout {
                spacing: 10; orientation: Qt.Horizontal; contentsMargin: 10
                LayoutItem {
                    objectName: "left"
                    minimumSize: "100x100"
                    maximumSize: "300x300"
                    preferredSize: "100x100"
                    Rectangle { objectName: "yellowRect"; color: "red"; anchors.fill: parent }
                }
                LayoutItem {
                    objectName: "left"
                    minimumSize: "100x100"
                    maximumSize: "300x300"
                    preferredSize: "100x100"
                    Rectangle { objectName: "yellowRect"; color: "green"; anchors.fill: parent }
                }
            }
        }
    }
}