Reputation: 121
I am new to Blackberry 10 development. I have created a button, but I am not able to do the Push screen function from the current screen to next screen. Here is the code I am using:
onClicked:{
navigationPane.push(firstPage);
}
And I have also implemented a tab using
TabbedPane {
activePane: Page {
Label {
id: label
text: "What do you like more, kittens or puppies?"
}
}
sidebarState: SidebarState.VisibleCompact
onActiveTabChanged: {
}
Tab {
title: "Puppies"
onTriggered: label.text = "kittens"
NavigationPane {
id: navigationPane
//how to call a screen from this,i got stuck with this,can any some send me simple code for pushing a screen.?
}
}
Tab {
title: "Kittens"
onTriggered: label.text = "I love kittens!"
NavigationPane {
id: navigationPane
> **`//how to call a screen from this,i got stuck with this,can any some send me simple code for pushing a screen.?`**
}
}
}
In this tab I want to do a push screen function while clicking the tab's icon. Can anyone help me with these two functions?
Thanks.
Upvotes: 0
Views: 145
Reputation: 513
here is the example for creating tabs for different screen,you are in main tab to go next qml as follows
Tab {
title: "Puppies"
NavigationPane {
id: navigationPane
Sample //this is one qml page as like Sample.qml
{
}
}
}
Tab {
title: "Kittens"
NavigationPane {
id: testpage
Test //this is one qml page as like Test.qml
{
}
}
}
you can access other qml files by setting the id:,
Upvotes: 1
Reputation: 1921
You have to declare a NavigationPane inside each Tab, and push inside it:
Tab {
title: "Puppies"
onTriggered: label.text = "kittens"
NavigationPane {
id: navigationPane
}
}
Upvotes: 0