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
Developer
dcharya
Posts: 74
Registered: ‎03-04-2012
My Device: developer
My Carrier: developer
Accepted Solution

Finding Child component from root in C++

Hi All,

 

In my application I am following this architecture for creating UI TabbebedPane then in first Tab of TabbedPane I have a NavigationPage then I created a page in navigation page and then there is a listview in the page.

I am facing following problems

 

1. When I push Navigation pane by setting activeTab property to set first tab as active tab Page doesn't respond it freezes.

 

2. When I am trying to find this listview in C++ code to bind GroupDataModel to show data that I am fetching from server.

 

I am using this code to get listview

 

ListView *listview = Application::instance()->findChild<ListView*>("listview");

 

Please help

 

Regards

 

 

 

Deepak Charya
Please use plain text.
Developer
dcharya
Posts: 74
Registered: ‎03-04-2012
My Device: developer
My Carrier: developer

Re: Finding Child component from root in C++

Thanks all,

 

Issue solved. I was doing a mistake. I was binding qml with navigation pane using ComponentDefinition which create dynamic QML compenents and hence i was not getting ListView using objectname or id of the list.

 

Solution of this problem is: Setcontent of the Tab like this 

 

Code Snippet

TabbedPane{
Tab {
        id: tab
        objectName: "Tab1"
        title: qsTr("TITLE")
        imageSource: "asset:///images/Chat.png"
        content: NextPage{
            id:test
        }
    }
.....
...
....

}

 

 

Thanks and Regards

 

Deepak Charya
Please use plain text.