diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-19 16:54:17 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-20 09:38:24 +0000 |
commit | 284faaa6eada5ef50db083b0936ca00e7f61ef2a (patch) | |
tree | 42333c689cf7a7f4a3957829eaa48d23fa28a05e | |
parent | 95965ba19f6a1cc04d8bc04e2c55ececcd87edbb (diff) |
Doc: Remove confusing and wrong section about aliases
I cannot figure out what this was supposed to mean.
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-119448
Change-Id: Iac8ede669d5b09c674abf115f13f977f854b7d96
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | src/qml/doc/snippets/qml/properties.qml | 15 | ||||
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc | 10 |
2 files changed, 2 insertions, 23 deletions
diff --git a/src/qml/doc/snippets/qml/properties.qml b/src/qml/doc/snippets/qml/properties.qml index 67a7267acf..39f508e424 100644 --- a/src/qml/doc/snippets/qml/properties.qml +++ b/src/qml/doc/snippets/qml/properties.qml @@ -229,20 +229,9 @@ Button { //! [image alias] Item { -id: widget - -//! [alias complete] -property alias widgetLabel: label - -//will generate an error -//widgetLabel.text: "Initial text" - -//will generate an error -//property alias widgetLabelText: widgetLabel.text - -Component.onCompleted: widgetLabel.text = "Alias completed Initialization" -//! [alias complete] + id: widget + property alias widgetLabel: label Text {id: label} } diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index 2cd246a3e3..0fb7d5f039 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -498,16 +498,6 @@ the other way around. \section4 Considerations for Property Aliases -Aliases are only activated once a component has been fully initialized. An -error is generated when an uninitialized alias is referenced. Likewise, -aliasing an aliasing property will also result in an error. - -\snippet qml/properties.qml alias complete - -When importing a \l{QML Object Types}{QML object type} with a property alias in -the root object, however, the property appear as a regular Qt property and -consequently can be used in alias references. - It is possible for an aliasing property to have the same name as an existing property, effectively overwriting the existing property. For example, the following QML type has a \c color alias property, named the same as the |