01-30-2013 11:23 AM - edited 01-30-2013 12:12 PM
I just made a simple TabbedPane sample. But it is weird that the TabbedPane screen could not be shown after pushing from NavigationPane while the TabbedPane screen did show the log when successfully onCreationCompleted.
May someone know what is wrong with my code? Thank you so much.
main.qml
NavigationPane {
id: nav
Page {
Container {
...
onTriggered: {
var page = tabbedPage.createObject();
nav.push(page);
}
...
attachedObjects: [
ComponentDefinition {
id: tabbedPage
source: "tabbedPage.qml"
}
]
tabbedPage.qml
// Tabbed Pane project template
import bb.cascades 1.0
TabbedPane {
showTabsOnActionBar: true
Tab {
title: qsTr("ABC")
Page {
id: tab1
Container {
Label {
text: "Text ABC"
}
}
}
}
Tab {
title: qsTr("123")
Page {
id: tab2
Container {
Label {
text: "Text 123"
}
}
}
}
onCreationCompleted: {
// this slot is called when declarative scene is created
// write post creation initialization here
console.log("TabbedPane - onCreationCompleted()")
}
}
Solved! Go to Solution.
01-30-2013 11:36 AM
01-30-2013 11:40 AM - edited 01-30-2013 11:41 AM
Becaue the business requirement is that the first page is a control panel, click each function on the control panel to enter into a tabbed screen.
Do you know whether we must use navigation to push a screen or not? Is there any other way to go to the next screen?
Or how can we implement clicking a button to show a new screen within the app without NavigationPane?
Thank you
01-30-2013 11:51 AM
01-30-2013 11:53 AM - edited 01-30-2013 12:10 PM
My business requirement only allows "about us" or "feed back" as the sheet type screen. It specifies the tabbed page must use transition to be shown that means must transit to the next page.
01-30-2013 02:07 PM - edited 01-30-2013 02:26 PM
Thank you for your suggestion, Strobejb, finally we decided to change the design idea to open a sheet with tabbedpane.
01-31-2013 08:47 AM
I just think about another senario. If the first page is the login screen after login then go to a home tabbed screen, how can we design this work flow if it is not possible from Navigation to TabbedPane?
01-31-2013 07:05 PM
01-31-2013 07:11 PM
Thank you Scott.
I am using similar way as yours but changed into immediately pull up a sheet of login. lol
02-10-2013 03:13 PM
Another idea is to only have one tab on the tabbed pane that contains the first screen. Having a tab bar with only one tab will hide the tab bar all together. Then after the user leaves the first screen you can populate the tab bars with more tabs and delete the tab used for the first screen.
It's still a hack though. They need to fix this.
Scott