summaryrefslogtreecommitdiffstats
path: root/howtos/propertyalias/index.rst
diff options
context:
space:
mode:
authorVladimir Minenko <vladimir.minenko@nokia.com>2012-06-18 12:12:21 +0200
committerVenugopal Shivashankar <venugopal.shivashankar@digia.com>2013-02-08 12:30:13 +0100
commite9053ba3f559fcf8c4d2dd3b6f87cce0979d0244 (patch)
tree0e6503d0068bed7b57ba751d4c200a70e5c5e7d3 /howtos/propertyalias/index.rst
parent4aa878fe08f8ed3f76cabf8a6b21603fa21fcb09 (diff)
Initial commit to add the learning-guide content
Change-Id: I5eb8ab089b46122bc6f7042e20541bf70f173447 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'howtos/propertyalias/index.rst')
-rw-r--r--howtos/propertyalias/index.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/howtos/propertyalias/index.rst b/howtos/propertyalias/index.rst
new file mode 100644
index 0000000..3e1bf0e
--- /dev/null
+++ b/howtos/propertyalias/index.rst
@@ -0,0 +1,30 @@
+..
+ ---------------------------------------------------------------------------
+ Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+ All rights reserved.
+ This work, unless otherwise expressly stated, is licensed under a
+ Creative Commons Attribution-ShareAlike 2.5.
+ The full license document is available from
+ http://creativecommons.org/licenses/by-sa/2.5/legalcode .
+ ---------------------------------------------------------------------------
+
+What is a property alias?
+=========================
+
+.. code-block:: js
+
+ import QtQuick 1.1
+
+ Rectangle {
+
+ property alias buttonLabel: label.text
+
+ Text {
+ id: label
+ text: "empty label"
+ anchors.fill: parent
+ }
+
+Unlike a property definition, which allocates a new, unique storage space for the property, a property alias connects the newly declared property, called the aliasing property as a direct reference to an existing property, the aliased property. Read or write operations on the aliasing property results in a read or write operations on the aliased property, respectively.
+
+Further reading can be found in the :qt:`Property Binding<propertybinding.html#property-aliases>` documentation.