Qt/QML学习-BusyIndicator
创始人
2025-01-09 07:04:11
0

QML学习

  • BusyIndicator例程
  • 视频讲解
  • 代码

main.qml

import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.15  Window {     width: 640     height: 480     visible: true     title: qsTr("Hello World")      BusyIndicator {         id: busyIndicator         anchors.fill: parent         MouseArea {             anchors.fill: parent             onClicked: {                 busyIndicator.running = busyIndicator.running? false: true             }         }          background: Rectangle {             id: backgroundRect             color: "transparent"         }          contentItem: Item {             Rectangle {                 anchors.centerIn: parent                 width: parent.width < parent.height? parent.width / 4 * 3: parent.height / 4 * 3                 height: width                 color: backgroundRect.color                 radius: height / 2                 border.width: height / 12             }              Canvas {                 id: canvas                 anchors.centerIn: parent                 width: parent.width < parent.height? parent.width / 4 * 3: parent.height / 4 * 3                 height: width                 property real angle: 0                 onPaint: {                     rotate()                 }                 function rotate() {                     var ctx = getContext('2d')                     ctx.clearRect(0, 0, canvas.width, canvas.height)                     ctx.beginPath()                     ctx.arc(width/2, height/2, height/2-height/12/2, canvas.angle, canvas.angle + Math.PI * 2 / 12, false)                     ctx.lineWidth = height / 12                     ctx.strokeStyle = "red"                     ctx.stroke()                     requestAnimationFrame(rotate)                 }                 Timer {                     repeat: true                     interval: 25                     onTriggered: {                         canvas.angle += Math.PI * 2 / 24                     }                     running: busyIndicator.running                 }             }         }     } } 

演示

  • 视频讲解

相关内容

热门资讯

we辅助poker德之星!德州... we辅助poker德之星!德州aiapp,(aapoKer)果然是真的有挂(详细透视wepoke教程...
微扑克辅助挂!pokerist... 微扑克辅助挂!pokerist有挂吗,(wepoKE)原来真的是有挂(详细透视黑科技教程);微扑克辅...
wepoke黑科技!wepok... wepoke黑科技!wepoke智能ai,(AAPoker)先前真的是有挂(详细透视2025新版教程...
微扑克辅助机器人!德扑ai软件... 微扑克辅助机器人!德扑ai软件购买,(WepokE)原生真的是有挂(详细透视技巧教程);原来确实真的...
德州之星有外挂!wopoker... 德州之星有外挂!wopoker用ai有用吗,(WEPoke)原先是有挂(详细辅助力荐教程)需要回顾用...
aapoker透明挂!微扑克靠... aapoker透明挂!微扑克靠谱吗,(wePOKE)确实真的是有挂(详细辅助科技教程)是一款可以让一...
微扑克全自动机器人!wpkpl... 微扑克全自动机器人!wpkplus有辅助器吗,(WEPoke)一向是有挂(详细辅助透视教程);揭秘教...
德州之星有辅助挂!线上微扑克代... 德州之星有辅助挂!线上微扑克代打,(线上wpk德州)最初真的有挂(详细辅助微扑克教程);小薇(透视辅...
德州之星插件!aa扑克软件,(... 1、德州之星插件!aa扑克软件,(AAPOKer)确实真的有挂(详细辅助微扑克教程)。2、德州之星插...
wepoke有没有挂!wpk微... wepoke有没有挂!wpk微扑克辅助透视,(wepoKe)切实是有挂(详细辅助2025新版教程);...