QML 实现圆形加载中指示器 Loading动画
效果
代码
import QtQuickItem {id: rootproperty bool running: visibleproperty real iconSize: 100property color color: "gray"//internalproperty real spotSize: iconSize / 10property real swingRadius: (iconSize - spotSize) / 2property int spotCount: 6property real shiftDegree: 12property real delayTime: 100property real loadingDuration: 2000width: iconSizeheight: iconSizeRectangle {id: centerAnchoranchors.centerIn: parent; width: spotSize; height: spotSizeRepeater {model: spotCountdelegate: Rectangle {id: spotwidth: spotSize; height: width; radius: width/2; color: root.color;x:0; y:-swingRadius;transform: Rotation {id: rotatororigin.x: spotSize/2;origin.y: swingRadius + spotSize/2;}Connections {target: rootignoreUnknownSignals: truefunction onRunningChanged() {if(root.running)rotator.angle = shiftDegree*indexrotAnim.running = root.running}}SequentialAnimation {id: rotAnimPauseAnimation { duration: delayTime*index }PropertyAnimation{target: rotator; properties: "angle"; duration: loadingDuration; loops: Animation.Infiniteeasing.type: Easing.InOutCircfrom: rotator.angle; to: rotator.angle - 360;}}}}}
}
QML 实现圆形加载中指示器 Loading动画相关推荐
- 10个CSS和jQuery的加载中(loading)动画效果实现
以往web开发中都使用Gif来实现加载中的效果,但是随着技术的发展我们也可以使用jQuery和CSS来实现加载中的效果,希望大家喜欢! 相关文章: 5个在线Ajax"加载中"旋转图 ...
- ajax的loading方法,Ajax加载中显示loading的方法
使用ajaxStart方法定义一个全局的"加载中..."提示$(function(){ $("#loading").ajaxStart(function(){ ...
- Flutter自定义加载中的Loading
一.定义 class YmDialog extends Dialog {final String title;const YmDialog(this.title, {Key? key}) : supe ...
- axios vue 加载效果动画_vue中使用axios拦截器实现数据加载之前的loading动画显示 @劉䔳...
首先新建一个 loading.vue组件,写loading动画效果 .loader { width: 100%; height: 100%; display: flex; align-items: c ...
- img加载中显示loading,加载失败显示默认图片(React)
实现效果 完整代码 import { useRef, useState } from 'react'; import './index.less'; import errorImg from '@/c ...
- img加载中显示loading,加载失败隐藏img并显示自定义内容而且可点击重新加载(React)
图片加载效果 完整代码 import { useRef, useState } from 'react'; import './index.less';export default function ...
- ECharts 异步加载数据及loading 动画
异步加载 echarts 示例中的数据是在初始化后setOption中直接填入的,但是很多时候可能数据需要异步加载后再填入.ECharts 中实现异步数据的更新非常简单,在图表初始化后不管任何时候只要 ...
- layui -- loading实现加载中效果
1.layer.msg layer.msg('Loading...', {icon: 16, shade: 0.01, time: 5000 }); 2.弹出遮罩层显示加载中 var loading ...
- vue跳转页面增加等待_vue-router懒加载时添加loading效果
近期在做一个微信公众号的项目,在页面跳转时发现页面会闪一下,用户体验很不好,而且如果网慢时页面是没有数据的样式会乱很丑.于是乎,就百度看了前人的各种解决方案,个人觉得以下链接中的方案还是很好的,代码简 ...
最新文章
- 2021年大数据Spark(十五):Spark Core的RDD常用算子
- Java Web——图像上传
- Postfix 配置参数速查
- c++函数模板和类模板
- webconfig和appconfig中出现特殊字符如何处理
- 在Fedora 20下创建桌面快捷方式:
- POJ 3253-Fence Repair(堆)
- android中include标签的使用
- Flutter 生命周期
- Leetcode 129. 根到叶子结点数字之和
- 六部工坊ros启智机器人定点导航技术_【展品抢鲜看】程天科技外骨骼机器人亮相峰会,让每个人享受机器人的服务!...
- Golang 流媒体音视频网络传输开源项目-LAL
- word之中快速插入已有公式的几种方法
- matlab怎么表示逻辑与,Matlab与或非等逻辑运算符使用操作方法
- 时差,不同国家之间的大概时差
- Java设计模式 - 依赖倒转原则
- Weka OneR 和 ZeroR 加深理解
- 教你如何赚你的第一桶金 - 2048(包括源代码)
- Java实现Apriori算法
- ARM基础教程 | ARM、Cortex-M与ARMv8-M什么关系?