diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-08-19 01:42:54 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-08-19 01:42:54 (GMT) |
commit | 4b4015f960ee94a7e244a7ca49297c68446984b0 (patch) | |
tree | 433761f8f15ba00fd6ae8b3ea7a55b10ff6d3f46 /examples/declarative | |
parent | 0e1d095a281e204d31217f1e5af6f3a796a89169 (diff) | |
download | Qt-4b4015f960ee94a7e244a7ca49297c68446984b0.zip Qt-4b4015f960ee94a7e244a7ca49297c68446984b0.tar.gz Qt-4b4015f960ee94a7e244a7ca49297c68446984b0.tar.bz2 |
Update Positioner Tests
Note that it still doesn't pass tests, due at least partially to an
error in the test code. This change also slips in a change to the
QLayoutItem example less of a bad example of how to integrate
QGraphicsLayouts.
Diffstat (limited to 'examples/declarative')
-rw-r--r-- | examples/declarative/layouts/layouts.qml | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/examples/declarative/layouts/layouts.qml b/examples/declarative/layouts/layouts.qml index d049e0a..1f6b956 100644 --- a/examples/declarative/layouts/layouts.qml +++ b/examples/declarative/layouts/layouts.qml @@ -1,25 +1,25 @@ import Qt 4.6 -QGraphicsView{ -QGraphicsScene{ -QGraphicsWidget{ - visible: true - opacity: 1 - geometry: "0,0,400x400" - layout: QGraphicsLinearLayout{ - LayoutItem{ - minimumSize: "100x100" - maximumSize: "300x300" - preferredSize: "100x100" - Rect { color: "yellow"; anchors.fill: parent } - } - LayoutItem{ - minimumSize: "100x100" - maximumSize: "400x400" - preferredSize: "200x200" - Rect { color: "green"; anchors.fill: parent } +Item { id: resizable + width:400; height:400; + GraphicsObjectContainer{ + anchors.fill:parent + QGraphicsWidget{ + geometry:{ "0,0," + parent.width.toString() + "x" + parent.height.toString(); } + layout: QGraphicsLinearLayout{ + LayoutItem{ + minimumSize: "100x100" + maximumSize: "300x300" + preferredSize: "100x100" + Rect { color: "yellow"; anchors.fill: parent } + } + LayoutItem{ + minimumSize: "100x100" + maximumSize: "400x400" + preferredSize: "200x200" + Rect { color: "green"; anchors.fill: parent } + } + } } } } -} -} |