diff options
Diffstat (limited to 'src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc')
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index c4ecaf367c..401e099ebf 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -464,22 +464,24 @@ Unlike an ordinary property, an alias has the following restrictions: must be provided when the alias is first declared. \li It cannot refer to \l {Attached Properties and Attached Signal Handlers} {attached properties}. -\li It cannot refer to grouped properties; the following code will not work: +\li It cannot refer to properties inside a hierarchy with depth 3 or greater. The + following code will not work: \code - property alias color: rectangle.border.color + property alias color: myItem.myRect.border.color - Rectangle { - id: rectangle + Item { + id: myItem + property Rectangle myRect } \endcode - However, aliases to \l {QML Basic Types}{value type} properties do work: + However, aliases to properties that are up to two levels deep will work. + \code - property alias rectX: object.rectProperty.x + property alias color: rectangle.border.color - Item { - id: object - property rect rectProperty + Rectangle { + id: rectangle } \endcode \endlist |