Results 1 to 4 of 4

Thread: Sequential animations on each listitem

  1. #1
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Sequential animations on each listitem

    I'm using Qt 5 Beta, QtQuick 2 and want to define Transitions when listview is loaded with different x,y positions

    of each listview.( the animation should be like each item should fall with contentY and settle in different x,y positions)


    The delegate of the ListView contains a text and I want to change the highlight while changing to the next ListItem using key press.


    Is this possible?

    Like below:

    I'm trying to arrange list items in the form of arc as shown below and want to scale each element with an OutQuad animation, and highlight each element on key down event with a background image with a background image which moves forward and backword on key down and up respectively.



    ListItem1



    ListItem2 ---> highlighted on key down pressed it should also conatain a highlight image



    ListItem3



    ListItem4



    ListItem5

  2. #2
    Join Date
    Feb 2012
    Posts
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Sequential animations on each listitem

    This is doable, but required clarity on the problem.

  3. #3
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Sequential animations on each listitem

    I think you have to try for the PathView.
    Heavy Metal Rules. For those about to rock, we salute you.
    HIT THANKS IF I HELPED.

  4. #4
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Sequential animations on each listitem

    As I would like to animate each item separately, I tried the below approach and code:-

    Mymodel would include item name, x coordinate and y cordinate ((relative to item’s position in the listview) . It would allow you to animate y from 0 to final value (item animated vertically, from the bottom of the item above). Defined the items to be hidden initially, and show them as part of the sequential animation so that each item is visible and animation is run one after other for each list item.



    However, all the items are being shown and then animation is run.

    Please correct me if am doing anything wrong in the below code snippet.






    Item {

    id: root

    width:640

    height:480

    focus: true

    ListModel {

    id: myModel



    ListElement {

    name: "Media"; posx: 300; posY: 50;

    }

    ListElement {

    name: "Audio"; posx: 250; posY: 100;

    }

    ListElement {

    name: "Video"; posx: 200; posY: 150;

    }

    ListElement {

    name: "Image"; posx: 150; posY: 200;

    }

    }



    Component {

    id:myDelegate



    Item {

    id: delegateItem

    widtharent.width

    x: posx

    y : posY

    visible : false



    Text {

    id: listitem

    text: name

    font.pointsize: 12

    }

    Component.OnCompleted {

    addAnimation.start()

    }

    SequentialAnimation {

    id: adAnimation

    propertyAction { target:delegateItem; property: "visible" ; value : true }

    propertyAction { target:delegateItem; property: "y" ; value : 0 }

    NumberAnimation { target : delegateItem ; property: "y" ; to : y; duartion : 1000 ;easing.type: Easing.InOutQuad }


    }

    }



    ListView {

    id: view

    anchors.fill : parent

    model:myModel

    delegate : myDelegate



    highlight { Item {Image { y:0 ; height:40 ; source : "focus.png" }

    }



    }

Similar Threads

  1. Sequential animations on each listitem
    By rama.kesi in forum Qt Quick
    Replies: 0
    Last Post: 8th October 2012, 05:24
  2. Animations
    By hema in forum Newbie
    Replies: 2
    Last Post: 11th July 2011, 12:05
  3. Animations
    By hema in forum The GraphicsView Framework
    Replies: 0
    Last Post: 8th July 2011, 06:54
  4. How to remove animations?
    By mirelon in forum Qt Programming
    Replies: 1
    Last Post: 4th February 2010, 09:41
  5. Combining sequential and parallel animation
    By mirelon in forum Qt Programming
    Replies: 0
    Last Post: 22nd January 2010, 15:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.