Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 36
Registered: ‎08-15-2013
My Device: Blackberry 10
My Carrier: XL
Accepted Solution

Change Object Position Every 5 second using Timer In QML

I Need some help, 

i have five circle like this

 

O O O O O

 

i want to make the bold one change position every 5 second and it's continously like slide indicator, can anybody tell me how to do it in QML ?

 

 

 

Developer
Posts: 543
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: Change Object Position Every 5 second using Timer In QML

[ Edited ]

Follow this

http://developer.blackberry.com/native/documentation/cascades/dev/signals_slots/signals_slots_add_ac...

One of the options is:

QML 

property int circleIndex: 0 // Firts circle

CustomTimer{
    id: timer
    interval: 5000 // 5 seconds
    onTimeout:{
        if (circleIndex == 4){ // 5th circle
            circleIndex = 0
        }else{
            circleIndex++
        }
    }
}

 

Hope it helps



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog