aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/src/concepts/positioning/anchors.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/doc/src/concepts/positioning/anchors.qdoc')
-rw-r--r--src/quick/doc/src/concepts/positioning/anchors.qdoc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/quick/doc/src/concepts/positioning/anchors.qdoc b/src/quick/doc/src/concepts/positioning/anchors.qdoc
index 871cd526d0..d0a14f7392 100644
--- a/src/quick/doc/src/concepts/positioning/anchors.qdoc
+++ b/src/quick/doc/src/concepts/positioning/anchors.qdoc
@@ -140,7 +140,8 @@ carefully ordered, or they may produce unexpected outcomes. The following exampl
\table
\row
\li
- \badcode
+ \code
+ //bad code
Rectangle {
width: 50
anchors.left: parent.left
@@ -185,7 +186,8 @@ conditional bindings, as this can lead to the ordering issue described above. In
the Rectangle will eventually grow to the full width of its parent, because both left and right anchors
will be simultaneously set during binding update.
-\badcode
+\code
+//bad code
Rectangle {
width: 50; height: 50
anchors.left: state == "right" ? undefined : parent.left;
@@ -201,7 +203,8 @@ ordering issues internally.
For performance reasons, you can only anchor an item to its siblings and direct parent. For example,
the following anchor is invalid and would produce a warning:
-\badcode
+\code
+//bad code
Item {
id: group1
Rectangle { id: rect1; ... }