diff -r 5dc02b23752f -r 3e2da88830cd demos/declarative/webbrowser/content/Button.qml --- a/demos/declarative/webbrowser/content/Button.qml Tue Jul 06 15:10:48 2010 +0300 +++ b/demos/declarative/webbrowser/content/Button.qml Wed Aug 18 10:37:55 2010 +0300 @@ -45,15 +45,21 @@ property alias image: icon.source property variant action + signal clicked + width: 40; height: parent.height Image { id: icon; anchors.centerIn: parent - opacity: action.enabled ? 1.0 : 0.4 + 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() + } } }