← Back to team overview

ubuntu-touch-coreapps team mailing list archive

[RSS Reader]

 

Hi,

I'm trying to test out tabbed navigation for the RSS reader, where I
would like to switch between different feeds by swiping left/right.
However, I can't seem to find any way to implement dynamic
adding/removal of tabs in the Ubuntu Tabs component.

Currently, I'm stuck with making a long list of tabs in the Tabs
component to be able to at least set them dynamically by accessing
ourTabs.__tabsModel.children[i]. This does however not seem like a very
good solution:

...

    function refresh() {
        ...
            ourTabs.__tabsModel.children[i].title = feed.displayName
        ...
    }
    Tabs {
        id: ourTabs
        anchors.fill: parent

        Tab {}
        Tab {}
        Tab {}
        Tab {}
        ...
    }

...

Do you know of a better way to add/remove tabs dynamically?


Cheers,
Svenn-Arne



Follow ups