summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/anchor-layout.qdoc
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-05 05:35:38 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-05 05:35:38 (GMT)
commit132830854a1b547666c1c65c7db1c6c089399637 (patch)
treea15312f08f636096f1de5906829237f9a9a4ef62 /doc/src/declarative/anchor-layout.qdoc
parente8f2cc813ba4faf41677f65c51a990eea5df4308 (diff)
downloadQt-132830854a1b547666c1c65c7db1c6c089399637.zip
Qt-132830854a1b547666c1c65c7db1c6c089399637.tar.gz
Qt-132830854a1b547666c1c65c7db1c6c089399637.tar.bz2
More doc conversion and cleanup.
Diffstat (limited to 'doc/src/declarative/anchor-layout.qdoc')
-rw-r--r--doc/src/declarative/anchor-layout.qdoc30
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index 2b1f081..9ff902ee 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -10,8 +10,8 @@ In additional to the more traditional Fx layouts GridLayout, HorizontalLayout, a
The Fx anchoring system allows you to define relationships between the anchor lines of different items. For example, you can write:
\code
-<Rect id="rect1" .../>
-<Rect id="rect2" anchors.left="{rect1.right}" .../>
+Rect { id: rect1; ... }
+Rect { id: rect2; anchors.left: rect1.right; ... }
\endcode
In this case, the left edge of \e rect2 is bound to the right edge of rect1, producing the following:
@@ -25,8 +25,8 @@ The anchoring system also allows you to specify margins and offsets. Margins spe
The following example specifies a left margin:
\code
-<Rect id="rect1" .../>
-<Rect id="rect2" anchors.left="{rect1.right}" anchors.leftMargin="5".../>
+Rect { id: rect1; ... }
+Rect { id: rect2; anchors.left: rect1.right; anchors.leftMargin: 5; ... }
\endcode
In this case, a margin of 5 pixels is reserved to the left of \e rect2, producing the following:
@@ -36,8 +36,8 @@ In this case, a margin of 5 pixels is reserved to the left of \e rect2, producin
You can specify multiple anchors. For example:
\code
-<Rect id="rect1" .../>
-<Rect id="rect2" anchors.left="{rect1.right}" anchors.top="{rect1.bottom}".../>
+Rect { id: rect1; ... }
+Rect { id: rect2; anchors.left: rect1.right; anchors.top: rect1.bottom; ... }
\endcode
\image edge3.png
@@ -45,9 +45,9 @@ You can specify multiple anchors. For example:
By specifying multiple horizontal or vertical anchors you can control the size of an item. For example:
\code
-<Rect id="rect1" x="0" .../>
-<Rect id="rect2" anchors.left="{rect1.right}" anchors.right="{rect3.left}".../>
-<Rect id="rect3" x="150" .../>
+Rect { id: rect1; x: 0; ... }
+Rect { id: rect2; anchors.left: rect1.right; anchors.right: rect3.left; ... }
+Rect { id: rect3; x: 150; ... }
\endcode
\image edge4.png
@@ -57,12 +57,12 @@ By specifying multiple horizontal or vertical anchors you can control the size o
For performance reasons, you can only anchor an item to its siblings and direct parent. For example, the following anchor would be considered invalid and would produce a warning:
\code
-<Item id="group1">
- <Rect id="rect1" .../>
-</Item>
-<Item id="group2">
- <Rect id="rect2" anchors.left="{rect1.right}".../> <!-- invalid anchor! -->
-</Item>
+Item { id: group1 }
+ Rect { id: rect1; ... }
+}
+Item id: group2">
+ Rect { id: rect2; anchors.left: rect1.right; ... } // invalid anchor!
+}
\endcode
*/