Item {
id: valueSource
objectName: "valueSource"
property real myvariable: 0
property real abc: 0
property real xyz: 0
SequentialAnimation {
running: true
loops: 1
PauseAnimation {
duration: 1000
}
PropertyAction {
target: valueSource
property: "start"
value: false
}
SequentialAnimation {
loops: Animation.Infinite
ParallelAnimation {
NumberAnimation {
target: valueSource
property: "abc"
easing.type: Easing.InOutSine
from: a //0
to: b //100
duration: 3000
}
NumberAnimation {
target: valueSource
property: "xyz"
easing.type: Easing.InOutSine
from: c //1
to: d //50
duration: 3000
}
}
}
}
I am using qt and cpp for the first time. So please help me even if it is a silly question. I am able to update value of abc and xyz from c++ code by using findChild("valueSource") but I would like to update values of 'from' and 'to' in NumberAnimation. 1) I tried to add a field objectName in NumberAnimation and then use this object in cpp code as I used to update abc and xyz but not able to modify value of from and to. 2) Also tried using a,b,c,d variables. Values of a,b,c,d are getting updated from cpp code and reflecting in qml as well but it is not updating value of to and from.
Is there any other way I can do it?