1
votes

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 ?

2

2 Answers

0
votes

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

0
votes

you can't able to push navigation Pane to tabbed pane, you can add navigationpane inside a tab as like

 Tab {
    id: loginregisterTab
    NavigationPane {
             peekEnabled: false
         id: test
        y{//here u can go to y.qml
        }
    }
}

in y.qml u have incliude the id like

NavigationPane{
 id: navigationPane
   Page {
    Container {
        id: test
  }
  }
 }