import Qt 4.7 Item { id: bt_add width: 188; height: 188 signal addClicked Image { id: bt_add_off; source: "images/bt_add_off.png"; } Image { id: bt_add_on; source: "images/bt_add_on.png"; opacity: 0; Behavior on opacity { NumberAnimation { duration: 150; } } } MouseArea { anchors.fill: parent onPressed: { bt_add.state = "pressed" } onReleased: { bt_add.state = "released"; bt_add.addClicked() } } states: [ State { name: "pressed" PropertyChanges{ target: bt_add_on; opacity: 1; } }, State { name: "released" PropertyChanges{ target: bt_add_on; opacity: 0; } } ] }