QML页面切换的动画效果
来源:互联网 发布:淘宝店铺如何注销 编辑:程序博客网 时间:2024/04/30 02:22
类似手机切换桌面的动画
作者 qq 843230304
只要qml子类化这个控件,就ok了
AnimationItem.qml
import QtQuick 2.0//使用锚地会导致位移动画无法使用Item { id: root property bool show: false property real showPropertyChangesX: 0 property real showPropertyChangesY: 0 property real showPropertyChangesZ: 1 property real showPropertyChangesOpacity: 1 property real hidePropertyChangesX: 0 property real hidePropertyChangesY: root.height/1.3; property real hidePropertyChangesZ: 0 property real hidePropertyChangesOpacity: 0 property alias transition: transition property alias animations: transition.animations x: (parent !== null) ? parent.x : undefined y: (parent !== null) ? parent.y : undefined width: (parent !== null) ? parent.width : undefined height: (parent !== null) ? parent.height : undefined visible: false state:"hide" states:[ State{ name:"show" PropertyChanges { target:root; opacity:showPropertyChangesOpacity; x:showPropertyChangesX; y:showPropertyChangesY; z:showPropertyChangesZ;} when:show }, State{ name:"hide" PropertyChanges {target:root; opacity:hidePropertyChangesOpacity; x:hidePropertyChangesX; y:hidePropertyChangesY; z:hidePropertyChangesZ} when:!show } ] transitions: Transition { id: transition onRunningChanged:{ if(running == true && show){ root.visible = true } if(running == false && !show){ root.visible = false } } animations:ParallelAnimation{ NumberAnimation { properties: "x,y"; easing.type: Easing.InOutCirc; duration: 300; } NumberAnimation { properties: "opacity"; easing.type: Easing.OutCirc; duration: 300 } } }}
阅读全文
0 0
- QML页面切换的动画效果
- qml页面切换动画效果
- android 页面切换动画效果
- android 页面切换动画效果
- iOS页面切换动画效果
- 页面切换动画效果1
- 页面切换动画效果2
- 页面切换动画效果3
- 页面切换动画效果4
- 页面切换动画效果5
- QML简单的动画切换Rectangle层次
- 强大的ViewPager多页面滑动切换以及动画效果
- 在页面切换时overridePendingTransition()实现的动画效果
- 强大的ViewPager多页面滑动切换以及动画效果
- Android页面切换时的动画效果(overridePendingTransition)
- 优化GestureDetector快速实现自定义动画效果的页面切换
- android用ViewPager实现带有动画效果的页面切换
- android学习笔记---56_activity切换动画与页面切换动画,自定义activity窗口切换动画效果的实现.
- Linux目录结构和常用命令大全
- CSDN笑死我了
- 用C#在windows上操控电脑自带蓝牙(入道指南)
- Android插件化框架总结
- cordova-plugin-geolocation遇到的坑
- QML页面切换的动画效果
- python xpath 例子
- android eclipse ant多渠道打包
- Video-based Person Re-identification with Accumulative Motion Context
- HTTP协议下实现上传文件
- 服务器软件安装历史
- Java解决取数据时“因数据库中 字符串含空格 而取值不成功”的问题
- HDU 2204 Eddy's爱好(容斥原理)
- 字符串、字符数组、字符串数组、字符数组的相互转换