12345678910111213141516171819202122232425 |
- import Qt 4.7
- Rectangle {
- id: container
- width: 80
- height: 80
- color: "#00000000"
- property string srcPic: "pvp.png"
- signal clicked(string srcPic)
- Image {
- anchors.fill: parent
- source: srcPic
- }
- Behavior on x { PropertyAnimation { duration: 500; easing.type: Easing.InOutQuad } }
- Behavior on y { PropertyAnimation { duration: 500; easing.type: Easing.InOutQuad } }
- MouseArea {
- anchors.fill: parent
- onClicked: container.clicked(srcPic)
- }
- }
|