×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    100

    Auto rotate ListView Elements

    Good day

    I have a QML ListView with each element fits the full screen, i want to rotate those elements to show the next one every 5 seconds. how to do that?

    Thanks!

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2012
    Posts
    55

    Re: Auto rotate ListView Elements

    You can use a QML Timer element to change the element using its onTriggered method.

    As such:
    Code:
    Timer {
            interval: 5000 //Milliseconds
            running: true
            repeat: true
            onTriggered: {
                //Assuming your ListView id is view
                //and that your ListModel id is listmodel
                var idx = view.currentIndex
                idx = (idx + 1) % (listmodel.count)
                view.currentIndex = idx
            }
        }
    Br,
    Villep

Similar Threads

  1. N97 - Auto Rotate not working?
    By jarop in forum General Development Questions
    Replies: 3
    Last Post: 2011-03-29, 12:11
  2. Auto rotate problem on n97
    By fpstudios in forum [Archived] Flash Lite on Nokia Devices
    Replies: 1
    Last Post: 2009-08-17, 15:20
  3. Auto rotate Canvas on N95
    By hweIPSQUARE in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2008-06-04, 09:06
  4. N78 - with or without auto rotate sensor?
    By sledgehammer89 in forum General Development Questions
    Replies: 6
    Last Post: 2008-03-06, 20:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×