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
Highlighted
Developer
Posts: 385
Registered: ‎07-20-2012
My Device: Blackberry Z10 (White), BlackBerry Dev Alpha C
My Carrier: O2 UK
Accepted Solution

Dynamic Active Frame With Data From One File

Hello, 

I am looking into creating a dynamic active frame (like the BBM active frame which has a header title and moves through updates). 

 

I am going to create a page which will have a header of "interesting facts" and then labels of different facts and I was wondering how I would go about setting it up to be able to create a dynamic active frame which cycles through the different labels? 

 

Thanks in advance Smiley Happy 

Developer
Posts: 108
Registered: ‎04-14-2013
My Device: BlackBerry Z30
My Carrier: Chunghwa Telecom

Re: Dynamic Active Frame With Data From One File

Hi

You can follow the sample code here.

 

https://github.com/blackberry/Cascades-Samples/tree/master/BfB-Showcase

 

In the "activeFrameQML.cpp" has this function

 

voidActiveFrameQML::update(){

     // TODO: Replace with data-driven update instead.

     if (isActiveFrame) {

         QTimer::singleShot(10000, this, SLOT(update()));

         emit updateChanged();

     }

}

 

And you can put your update code in the "AppCover.qml"  to update your ActiveFrame  Smiley Very Happy

BlackBerry Certified Cascades Developer