aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2019-06-19 11:47:56 +0200
committerPaul Wicking <paul.wicking@qt.io>2019-06-19 11:22:08 +0000
commit2d4787de33ce81cf53cda6f63719f1167bd94392 (patch)
treee5631862918f89d3a84a93d529c78ef02a8d27b8 /src/qml/doc
parente937a7387876c130cabf8ac640a9d4ffd22fd1cb (diff)
Doc: Fix \code and \qml usage in 'QML Object Attributes'
Missing \endcode commands caused malformed output and linking issues. Change-Id: Idaf3cf998c2c0f4352a738b21b66abe5e89c197d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
index 15e8e4c52c..c4ecaf367c 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
@@ -548,7 +548,7 @@ Therefore, if you create an alias to an object referenced via id with extra
properties declared inline, the extra properties won't be accessible through
the alias:
-\code
+\qml
// MyItem.qml
Item {
property alias inner: innerItem
@@ -558,23 +558,23 @@ Item {
property int extraProperty
}
}
-\code
+\endqml
You cannot initialize \a inner.extraProperty from outside of this component, as
inner is only an \a Item:
-\code
+\qml
// main.qml
MyItem {
inner.extraProperty: 5 // fails
}
-\code
+\endqml
However, if you extract the inner object into a separate component with a
dedicated .qml file, you can instantiate that component instead and have all
its properties available through the alias:
-\code
+\qml
// MainItem.qml
Item {
// Now you can access inner.extraProperty, as inner is now an ExtraItem
@@ -589,8 +589,7 @@ Item {
Item {
property int extraProperty
}
-\code
-
+\endqml
\section3 Default Properties