Skip to content
slint
import { ProgressIndicator } from "std-widgets.slint";export component Example inherits Window {    width: 200px;    height: 25px;    background: transparent;    ProgressIndicator {        width: 90%;        height: parent.height;        progress: 80%;    }}

progressindicator example

ProgressIndicator 用于向用户通知正在进行的操作的状态,例如从网络加载数据。

属性

indeterminate

bool default: false

如果操作的进度无法通过值确定,则设置为 true。

progress

float default: 0

完成的百分比,取值在 0 到 1 之间。小于 0 或大于 1 的值将被限制在范围内。

slint
ProgressIndicator {    progress: 0.5;}

基于 MIT 协议发布