summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/declarative/snippets/integrating/graphicswidgets/main.qml')
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/main.qml32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml b/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
new file mode 100644
index 0000000..ffcf79d
--- /dev/null
+++ b/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
@@ -0,0 +1,32 @@
+import Qt 4.7
+import Qt.widgets 4.7
+
+Rectangle {
+ width: 200
+ height: 200
+
+ RedSquare {
+ id: square
+ width: 80
+ height: 80
+ }
+
+ BlueCircle {
+ anchors.left: square.right
+ width: 80
+ height: 80
+ }
+
+ QGraphicsWidget {
+ anchors.top: square.bottom
+ size.width: 80
+ size.height: 80
+ layout: QGraphicsLinearLayout {
+ LayoutItem {
+ preferredSize: "100x100"
+ Rectangle { color: "yellow"; anchors.fill: parent }
+ }
+ }
+ }
+}
+