足球移动动画
来源:互联网 发布:手机淘宝怎样撤销投诉 编辑:程序博客网 时间:2024/04/30 19:46
import QtQuick 2.6
import QtQuick.Controls 1.5
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
menuBar: MenuBar {
Menu {
title: qsTr("File")
MenuItem {
text: qsTr("&Open")
onTriggered: console.log("Open action triggered");
}
MenuItem {
text: qsTr("Exit")
onTriggered: Qt.quit();
}
}
}
property int duration: 3000
Rectangle {
id: sky
width: parent.width
height: parent.height/2
gradient: Gradient {
GradientStop { position: 0.0; color: "#0080FF" }
GradientStop { position: 1.0; color: "#66CCFF" }
}
}
Rectangle {
id: ground
anchors.top: sky.bottom
//height: 200
anchors.bottom: parent.bottom
width: parent.width
gradient: Gradient {
GradientStop { position: 0.0; color: "#00FF00" }
GradientStop { position: 1.0; color: "#00803F" }
}
}
Image {
id: football
source: "test2.png"
x:10
y:parent.height-100
width: 40
height: 40
//anchors.bottom: ground.bottom
MouseArea{
anchors.fill: parent
onClicked: {
football.x=10
football.y = football.parent.height-football.height
football.rotation = 0
anim.restart()
}
}
}
SequentialAnimation {
id: anim
NumberAnimation {
target: football
properties: "x,y"
to: 150
duration: parent.duration * 4
}
NumberAnimation {
target: football
properties: "x,y"
to: 0
duration: parent.duration * 14
}
NumberAnimation {
target: football
properties: "x,y"
to: anim.parent.height
duration: parent.duration * 16
}
}
}
0 0
- 足球移动动画
- 足球
- 足球
- 足球
- 移动动画
- android动画-移动动画问题
- Android 移动动画- TranslateAnimation
- Android 移动动画- TranslateAnimation
- QML-动画-移动字符串
- UIView动画移动效果
- 移动动画问题
- 简单移动动画
- iOS触摸移动动画
- 【动画】TranslateAnimation 移动控件
- TranslateAnimation移动动画Demo
- css3移动端动画
- TranslateAnimation 动画移动
- html移动动画
- 判断textarea文本域的字数是否超限
- C#缩放和裁剪图片
- php数据结构和算法
- HDU 3584 Cube(三维树状数组)
- Python 爬虫7——自定义Item Pipeline将数据存入MongoDB
- 足球移动动画
- android 内存泄漏
- angularJs
- Java IO操作——对象序列化(Serializable接口、ObjectOutputStream、以及与Externalizable接口的用法和区别)
- MySQL命名、设计及使用规范
- Activiti 网关
- android 属性动画
- Unity -- UI -- Scroll Rect
- 常见git用法总结