This commit is contained in:
zhuzichu 2023-09-26 11:29:11 +08:00
parent 36da8cd785
commit 5240f826c5
2 changed files with 18 additions and 1 deletions

View File

@ -19,6 +19,13 @@ ProgressBar{
border.color: control.backgroundColor
border.width: control.strokeWidth
}
onIndeterminateChanged:{
if(!indeterminate){
animator_r.duration = 0
layout_item.rotation = 0
animator_r.duration = 888
}
}
QtObject{
id:d
property real _radius: control.width/2-control.strokeWidth/2
@ -34,7 +41,9 @@ ProgressBar{
}
}
contentItem: Item {
id:layout_item
RotationAnimation on rotation {
id:animator_r
running: control.indeterminate && control.visible
from: 0
to:360

View File

@ -19,6 +19,13 @@ ProgressBar{
border.color: control.backgroundColor
border.width: control.strokeWidth
}
onIndeterminateChanged:{
if(!indeterminate){
animator_r.duration = 0
layout_item.rotation = 0
animator_r.duration = 888
}
}
QtObject{
id:d
property real _radius: control.width/2-control.strokeWidth/2
@ -34,7 +41,9 @@ ProgressBar{
}
}
contentItem: Item {
id:layout_item
RotationAnimation on rotation {
id:animator_r
running: control.indeterminate && control.visible
from: 0
to:360
@ -71,4 +80,3 @@ ProgressBar{
anchors.centerIn: parent
}
}