diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-10-01 03:03:27 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-10-01 03:03:27 (GMT) |
commit | 7e289c9778600e481783766c6fefb7c06462bd8d (patch) | |
tree | 73be6303fb831c149def6a09fae16aae556afb17 | |
parent | 4853daab68b9a581aadf40dedd1353b963d1b07f (diff) | |
download | Qt-7e289c9778600e481783766c6fefb7c06462bd8d.zip Qt-7e289c9778600e481783766c6fefb7c06462bd8d.tar.gz Qt-7e289c9778600e481783766c6fefb7c06462bd8d.tar.bz2 |
* use alias in CalcButton.qml
* do not set a z value (broken with positioners atm)
-rw-r--r-- | demos/declarative/calculator/CalcButton.qml | 8 | ||||
-rw-r--r-- | demos/declarative/calculator/calculator.qml | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml index 966c8e4..55b5f0c 100644 --- a/demos/declarative/calculator/CalcButton.qml +++ b/demos/declarative/calculator/CalcButton.qml @@ -1,9 +1,9 @@ import Qt 4.6 Rectangle { - property string operation - property bool toggable : false - property bool toggled : false + property alias operation: Label.text + property bool toggable: false + property bool toggled: false signal clicked id: Button; width: 50; height: 30 @@ -13,7 +13,7 @@ Rectangle { GradientStop { id: G2; position: 1.0; color: Palette.button } } - Text { anchors.centerIn: parent; text: operation; color: Palette.buttonText } + Text { id: Label; anchors.centerIn: parent; color: Palette.buttonText } MouseRegion { id: ClickRegion diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml index b95cc7ab..d93f04a 100644 --- a/demos/declarative/calculator/calculator.qml +++ b/demos/declarative/calculator/calculator.qml @@ -12,7 +12,7 @@ Rectangle { Rectangle { id: Container - width: 316; height: 50; z: 2 + width: 316; height: 50 border.color: Palette.dark; color: Palette.base Text { @@ -104,7 +104,6 @@ Rectangle { CalcButton { operation: "M+" } CalcButton { operation: "+/-" } } - } } |