You are not starting the animation anywhere. Either start it by calling start()
, or use the declarative approach. Here's an example for the former:
ProgressBar{
id : p1
indeterminate: true
onValueChanged: anim.start()
ColorAnimation {
id: anim
from: "white"
to: "black"
duration: 200
}
}