关键词:MouseArea,transitions,ParallelAnimation,NumberAnimation
在mail.qml中添加如下代码:
Rectangle {
width: 400
height: 400
Rectangle {
id: coloredRect
width: 100
height: 100
anchors.centerIn: parent
color: "red"
MouseArea {
id: mouser
anchors.fill: parent
hoverEnabled: true
}
states: State {
name: "state"
when: mouser.containsMouse
PropertyChanges {
target: coloredRect
width: 300
}
PropertyChanges {
target: coloredRect
height: 300
}