diff options
author | Edward Welbourne <edward.welbourne@theqtcompany.com> | 2015-10-08 10:06:06 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2016-09-21 15:09:06 +0000 |
commit | 7af1c2dc0e160652a9583cf1798720cd0f3d72f8 (patch) | |
tree | e2ddb560a5d6347cf3c0b4846e8cc8c654a949f5 /src/qml/doc/src/qmllanguageref/syntax/signals.qdoc | |
parent | a273a0ad9c1df7aed612ee6353753f668d545076 (diff) |
Give SquareButton types a side property to mediate being square.
We shouldn't be setting width and height for each square; we should
only need to set their side, which determines their width and height -
so that they're actually square !
More pertinently, this could later serve as an illustration of how to
use properties and bindings. Ideally, we'd do this in some way that
actually ensures setting width or height changes side; but the simple
approach will do for now.
Change-Id: I0df89e11221dde5d1d2930c4a779b59cf0d46654
Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src/qml/doc/src/qmllanguageref/syntax/signals.qdoc')
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/signals.qdoc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc index 602b202ed4..4a022f2b0b 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc @@ -187,7 +187,8 @@ Rectangle { signal activated(real xPosition, real yPosition) - width: 100; height: 100 + property int side: 100 + width: side; height: side MouseArea { anchors.fill: parent |