Search code examples
blackberry-10

Blackberry10 cascades onClick


i have tried a onClick function in BB-10 ,while Clicking i can't able to push another qml file the on click function

Button {
                text: "LOG IN"
                onClicked: {
                    var test = screen.createObject();
                     navigationPane.push(test);
                }
                attachedObjects: ComponentDefinition {
                    id: screen
                    source: "y.qml"
                }
            } 

The code y.qml as follows

             TabbedPane {
showTabsOnActionBar: true
Tab {
    title: "Home"
    Page {
        id: page1
        actions: [
            ActionItem {
                title: "New"
            },
            ActionItem {
                title: "Delete"
            }
        ]
    }
}
Tab {
    title: "Options"
    Page {
        id: page2
        actions: [
            ActionItem {
                title: "Edit"
            },
            ActionItem {
                title: "Save"
            }
        ]
    }
}

I can't able to view the "y.qml" while Clicking(text: "LOG IN") button, can anyone send some solutions,to solve this problem ?


Solution

  • you can't push tabbed pane from navigationPage, you can only push a Page; but within TabbedPane you can have navigationpane.