diff options
Diffstat (limited to 'examples/declarative/layouts/layouts.qml')
-rw-r--r-- | examples/declarative/layouts/layouts.qml | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/examples/declarative/layouts/layouts.qml b/examples/declarative/layouts/layouts.qml index 4b2a3f8..1d34afd 100644 --- a/examples/declarative/layouts/layouts.qml +++ b/examples/declarative/layouts/layouts.qml @@ -1,30 +1,25 @@ -import Qt 4.6 +import Qt 4.7 import Qt.widgets 4.6 Item { id: resizable width:400 height:400 + QGraphicsWidget { + size.width:parent.width + size.height:parent.height - GraphicsObjectContainer { - anchors.fill:parent - - QGraphicsWidget { - size.width:parent.width - size.height:parent.height - - layout: QGraphicsLinearLayout { - LayoutItem { - minimumSize: "100x100" - maximumSize: "300x300" - preferredSize: "100x100" - Rectangle { color: "yellow"; anchors.fill: parent } - } - LayoutItem { - minimumSize: "100x100" - maximumSize: "400x400" - preferredSize: "200x200" - Rectangle { color: "green"; anchors.fill: parent } - } + layout: QGraphicsLinearLayout { + LayoutItem { + minimumSize: "100x100" + maximumSize: "300x300" + preferredSize: "100x100" + Rectangle { color: "yellow"; anchors.fill: parent } + } + LayoutItem { + minimumSize: "100x100" + maximumSize: "400x400" + preferredSize: "200x200" + Rectangle { color: "green"; anchors.fill: parent } } } } |