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
New Developer
dalight13
Posts: 11
Registered: ‎10-01-2009
My Device: Not Specified

Startup Tab

Hello everyone!

 

I'm looking for a way to make the user choose the tab on which the app starts.

 

Thanks

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Startup Tab

How about just using Qsettings to record the last one they were on?


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
New Developer
Ksantor
Posts: 9
Registered: ‎03-11-2014
My Device: Z10
My Carrier: BITE Latvia

Re: Startup Tab

In your main.qml

 

TabbedPane {
    id: root_tab

    activeTab: activeTab()
    
    function activeTab() {
        var default_tab = settings.getvalueFor("default_tab", "some_tab");
        switch (default_tab) {
            case "some_tab": return some_tab
            case "second_tab": return second_tab
            case "third_tab": return third_tab
            case "fourth_tab": return fourth_tab
        }
    }
}

 

In my case I have a qml->setContextProperty for 'settings' in application constructor

Hope you know/figure out how to use QSettings.

Please use plain text.