summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
blob: 17925008e732af6322e504e0e04f36034eb191fe (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
import Qt 4.6
import Qt.widgets 4.6

Item {
    id: resizable
    width:300
    height:300

    GraphicsObjectContainer {
        anchors.fill: parent
        synchronizedResizing: true

        QGraphicsWidget {

            layout: QGraphicsLinearLayout {
                spacing: 0
                LayoutItem {
                    objectName: "left"
                    minimumSize: "100x100"
                    maximumSize: "300x300"
                    preferredSize: "100x100"
                    Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
                }
                LayoutItem {
                    objectName: "right"
                    minimumSize: "100x100"
                    maximumSize: "400x400"
                    preferredSize: "200x200"
                    Rectangle { objectName: "greenRect"; color: "green"; anchors.fill: parent }
                }
            }
        }
    }
}