summaryrefslogtreecommitdiffstats
path: root/demos/declarative/webbrowser/content/Button.qml
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-06-10 04:29:21 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-06-10 04:29:21 (GMT)
commit2115bbae2387335f8ea29e0ffee70e00d4a15dc1 (patch)
tree026bb4b5fba958ae0c7989cab21d2e482ddc9ac1 /demos/declarative/webbrowser/content/Button.qml
parentfa9c32829025121ab203565dd86a1c55028f40aa (diff)
downloadQt-2115bbae2387335f8ea29e0ffee70e00d4a15dc1.zip
Qt-2115bbae2387335f8ea29e0ffee70e00d4a15dc1.tar.gz
Qt-2115bbae2387335f8ea29e0ffee70e00d4a15dc1.tar.bz2
Add go button to webbrowser example.
Task-number: QTBUG-11310
Diffstat (limited to 'demos/declarative/webbrowser/content/Button.qml')
-rw-r--r--demos/declarative/webbrowser/content/Button.qml10
1 files changed, 8 insertions, 2 deletions
diff --git a/demos/declarative/webbrowser/content/Button.qml b/demos/declarative/webbrowser/content/Button.qml
index 4642cc7..2a2e7ef 100644
--- a/demos/declarative/webbrowser/content/Button.qml
+++ b/demos/declarative/webbrowser/content/Button.qml
@@ -45,15 +45,21 @@ Item {
property alias image: icon.source
property variant action
+ signal clicked
+
width: 40; height: parent.height
Image {
id: icon; anchors.centerIn: parent
- opacity: if(action != undefined) {action.enabled ? 1.0 : 0.4} else 0
+ opacity: if (action != undefined) { action.enabled ? 1.0 : 0.4 } else 1
}
MouseArea {
anchors { fill: parent; topMargin: -10; bottomMargin: -10 }
- onClicked: action.trigger()
+ onClicked: {
+ if (action != undefined)
+ action.trigger()
+ parent.clicked()
+ }
}
}