Why the type NumberAnimation on x don't work when i change it?
Solved
QML and Qt Quick
-
hi,Why the type NumberAnimation on x don't work when i change it
from :0 ;to:100; change to from:0;to:(menuspiral.width)/3;(menuspiral is Id window and so menuspiral.width is width of screen. )
for more inforamtion this source work and my image horizontally from 0 to 100 was moving..Image { source: "Image-Core-Render/SVG-Fruit2th/Fruit2-7.svg" y: (menuspiral.height)/2 width: 100; height: 100 NumberAnimation on x { duration:2000 loops: Animation.Infinite running:true from: 0; to:100 } MouseArea { id: myMouse } }
but for this source it doesn't move and doesn't has any animation,
it is fiixed!Image { source: "Image-Core-Render/SVG-Fruit2th/Fruit2-7.svg" y: (menuspiral.height)/2 width: 100; height: 100 NumberAnimation on x { duration:2000 loops: Animation.Infinite running:true from: 0; to:(menuspiral.width)/3 } MouseArea { id: myMouse } }
how can i solve my problem,thanks for reply.
-
i concluded that we should define a property like fg in NumberAnimation
and we have property int fg:menuspiral.width/3 in type Windownow it works.
NumberAnimation on x { property int fg duration:2000 loops: Animation.Infinite running:true from: 0; to:fg }