Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha
Accepted Solution

need help with native sdk 10

Hello. I am trying to make a simple app with cascades.

Main.qml has 4 butons.

How can i connect those buttons with other *.qml

you know, simple app, just click the app and then go to a different page with every button.

any kind of help will be appreciated. thanks.

Please use plain text.
BlackBerry Development Advisor (Retired)
selom
Posts: 60
Registered: ‎05-10-2012
My Device: Blackberry 10 Alpha

Re: need help with native sdk 10

Instead of Page, start your main.qml with NavigationPane. for example

NavigationPane {
    id : navPane
    Page {
        id : getpage
        content: Container {
            layout : DockLayout {   
            }
            Button {
                text : "hello world!"
                onClicked: {
                    navPane.deprecatedPushQmlByString("page2.qml");
                }
            }
        }
    }
}                 

 when page2.qml loads it will automatically have a backbutton to go back to your main page etc.

Good luck.

Please use plain text.
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha

Re: need help with native sdk 10

thanks!!!! i ll try it later and i ll get back to you. much appreciated!!!!

 

Please use plain text.
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha

Re: need help with native sdk 10

so page2.qml should be a page or a navigation pane?

Please use plain text.
BlackBerry Development Advisor (Retired)
selom
Posts: 60
Registered: ‎05-10-2012
My Device: Blackberry 10 Alpha

Re: need help with native sdk 10

It could be either. If you want to navigate to page3 from page2, then you would put in another NavigationPane. If it doesn't go anywhere but back, then use Page.

Please use plain text.
Contributor
tipul07
Posts: 11
Registered: ‎10-28-2012
My Device: Z10

Re: need help with native sdk 10

It is strange it's called deprecatedPushQmlByString... I'm totally BB10 newbie, but it sounds like it's deprecated rite? Should we find another way?
Please use plain text.