From 7e289c9778600e481783766c6fefb7c06462bd8d Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 1 Oct 2009 13:03:27 +1000 Subject: * use alias in CalcButton.qml * do not set a z value (broken with positioners atm) --- demos/declarative/calculator/CalcButton.qml | 8 ++++---- demos/declarative/calculator/calculator.qml | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'demos/declarative/calculator') diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml index 966c8e485f..55b5f0c413 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 b95cc7ab92..d93f04af2a 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: "+/-" } } - } } -- cgit v1.2.1