import QtQuick 1.0 Rectangle { id: imagedButton property string normalStateSource property string pressedStateSource signal clicked() signal pressed() height: image.sourceSize.height width: image.sourceSize.width color: "transparent" Image { id: image anchors.fill: parent source: normalStateSource } MouseArea { id: mouse anchors.fill: parent onClicked: imagedButton.clicked() onPressed: imagedButton.pressed() } states: [ State { name: "pressed"; when: mouse.pressed === true PropertyChanges { target: image source: pressedStateSource } } ] }