Important: Please read the Qt Code of Conduct -

QML Animation

  • hello everyone,
    i want to use a js function to give animation to a QML that i can get the x and y co-ordinate of my element as and when the element changes its can i do that ?
    or is there a way in sequentialAnimation to d same ?

  • Hello,

    for parallel animation, there is "ParallelAnimation": . From for JS code you just call

  • Hi, you can use the onXChanged and onYChanged signals of your item and change properties (ex:item_n_xCoord,item_n_yCoord) from the parent which other sub items/dynamically created items can refer to. While the item is moved by an animation, your signals should update the properties on the main page..

    onXChanged: {
    parentItem.item_n_xCoord = x
    //parentItem is the id of the parent where the item is (dynamically created)

    onYChanged: {
    parentItem.item_n_yCoord = y

    hope this helps..

  • @task
    i have actually given animation to two objects...and i want the "state" to change or a different animation to execute when the two objects just cross each can i do that ??

Log in to reply