09-06-2013 03:06 PM
I've been developing for Blackberry for a few weeks, so I'm still pretty new at it. I'm coming from a background of a about a year of Android dev experience if that helps.
I have some questions regarding if I'm using accepted practices as far as swapping out content on my tabs. According to the design I was given, I have tabs that are selected through the action menu, and I only display the current tab on the action bar. The rest of the bar is filled with action items.
When you click the action items I want to swap out content in the Tab object's area. I'm starting out with some logic like this:
QString qmlResourcePath = "asset:///layout/meeting_tabs/room_tab/room_page.q
QmlDocument * qml = QmlDocument::create(qmlResourcePath);
AbstractPane * oldPane = currentPane;
currentPane = qml->createRootObject<AbstractPane>();
Is this an acceptable way of doing this? Is there a better way? Is the QmlDocument object automatically deleted with the pane or do I need to explicilty delete it.
I use AbstractPane because I'm going to need to set both NavigationPane and Page objects as the tab content.