aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/snippets
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2025-09-24 14:48:23 +0200
committerUlf Hermann <ulf.hermann@qt.io>2025-09-30 14:05:07 +0200
commit78c1e301a61087b7a11ade36cd9f4acb4fc8a555 (patch)
treedc664b0be283710a403a1e8b12a7b2a73d9146d1 /src/qml/doc/snippets
parentd60327c3136d634c11a21d8909d5db5dbacdde19 (diff)
Doc: Remove misleading example about alias overriding
Apparently the author wanted to show an alias overriding a property and still retain control over the property. This doesn't work and simply confuses any reader. Pick-to: 6.10 6.8 Change-Id: Id63708eb7623d4cd24a81135156b237d85f2ca74 Reviewed-by: Dmitrii Akshintsev <dmitrii.akshintsev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/doc/snippets')
-rw-r--r--src/qml/doc/snippets/qml/properties.qml25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/qml/doc/snippets/qml/properties.qml b/src/qml/doc/snippets/qml/properties.qml
index 59c05f9e98..6c22f03169 100644
--- a/src/qml/doc/snippets/qml/properties.qml
+++ b/src/qml/doc/snippets/qml/properties.qml
@@ -235,31 +235,6 @@ Item {
Text {id: label}
}
-//![alias overwrite]
-Rectangle {
- id: coloredrectangle
- property alias color: bluerectangle.color
- color: "red"
-
- Rectangle {
- id: bluerectangle
- color: "#1234ff"
- }
-
- Component.onCompleted: {
- console.log (coloredrectangle.color) //prints "#1234ff"
- setInternalColor()
- console.log (coloredrectangle.color) //prints "#111111"
- coloredrectangle.color = "#884646"
- console.log (coloredrectangle.color) //prints #884646
- }
-
- //internal function that has access to internal properties
- function setInternalColor() {
- color = "#111111"
- }
-}
-//![alias overwrite]
//! [parent end]
}
//! [parent end]