QPropertyAnimation移动动画小Demo
来源:互联网 发布:粤语入门软件 编辑:程序博客网 时间:2024/05/16 17:34
先看看效果:
关键代码:
#include <QPropertyAnimation>
QPropertyAnimation *m_leftAnimation;
QPropertyAnimation *m_rightAnimation;
m_leftAnimation = new QPropertyAnimation(ui->lab_left,"pos");
m_rightAnimation = new QPropertyAnimation(ui->lab_right,"pos");
int duration = 2000;
m_leftAnimation->setDuration(duration);
m_rightAnimation->setDuration(duration);
m_leftAnimation->setStartValue(QPoint(0,0));
m_leftAnimation->setEndValue(QPoint(-width/2,0));
m_rightAnimation->setStartValue(QPoint(width/2,0));
m_rightAnimation->setEndValue(QPoint(width,0));
m_leftAnimation->setEasingCurve(QEasingCurve::InOutCirc);
m_rightAnimation->setEasingCurve(QEasingCurve::InOutCirc);
m_leftAnimation->start();
m_rightAnimation->start();
阅读全文
0 0
- QPropertyAnimation移动动画小Demo
- 解决QPropertyAnimation动画小bug
- QPropertyAnimation渐隐动画
- TranslateAnimation移动动画Demo
- Qt属性动画之QPropertyAnimation
- jquery移动动画的Demo
- Qt动画效果的实现,QPropertyAnimation
- QPropertyAnimation动画 可以运行的例子
- QPropertyAnimation实现控件动画的注意事项
- Qt动画效果的实现,QPropertyAnimation
- 【qt】动画按钮---QPropertyAnimation的使用
- QT 动画透明度不起作用 QPropertyAnimation windowOpacity
- 【效果】移动画图动画简易demo
- 移动+透明渐变叠加动画Demo
- 进度条小飞机移动动画
- IOS移动和方法小Demo
- Vue小Demo,仿lofter移动端
- iOS小demo之弹出动画
- mysql 正则匹配内容查询、拼接sql语句
- 视图解析器(7)
- Spring整合mybatis (二)
- 机器人领域几大国际会议
- 请接好这份关于流程图怎么画的攻略
- QPropertyAnimation移动动画小Demo
- 《图解HTTP》整理(3)
- android 获取当前系统的语言
- Google死磕Facebook_想知道AI巨头为何钟情于游戏?
- 代码干货 | vue.js列表渲染
- rhel 下docker的安装配置与使用
- android RXJava入门(Rxjava1.0)
- 引导页
- python实例(输出时间)