05-16-2012 02:34 AM
As the sample apps tell us how to manage multi pages with NavigationPane,
and the pages is displayed by function call "Application::setScene(root);"
So, I have one idea, could we call this function multi times to display single page instead of using NavigationPane.
Is there any risks? In simulator, when I call the function "Application::setScene(root);" frequently, the app will crash. what's the reason?
and another question is, how does the implement of NavigationPane:ush works? why this can display single pages?
05-17-2012 07:25 AM
Please refer to the documentation for the supported ways to display multiple screens in your application:
Are there any issues to using NavigationPane in your application?
05-17-2012 10:06 PM
I experineced the navigation pane, but when page swith, there is a default animation, one page smoothly flips to another page. and navigation pane is hard to manage too many pages, developer will find it is hard to find which page he want to navigate.
in navigation pane, there is a methond deprecatedPushQmlByString,
how does this function switch page?
could bb expose some detail info?
05-18-2012 09:06 AM
How is it hard to manage? Could you expand on the issues being experienced?
If your problem is clearly stated then we can start looking into solutions.
05-18-2012 10:56 AM
The navigation pane is probably not what you are looking for. It's primary intent is a stack of panes, not random access. However, it might be the right choice if you want an interesting effect where switching pages goes through a basic background. You could try having the navigation pane have a background and the current page. Pop (or pop and delete) the current page and push the replacement page.
The sample weatherguesser shows an example use of tabbed pane.
I haven't tried this yet, but I expect what you want is a Pane. setContent to the new page. Keep in mind that as per the very clear documentation, the pane owns all content and frees it when the pane is deleted. So you could keep your content in a hash table, and set content to the page of interest.
Let us know if this approach makes sense for you; in the meantime I'll try out this technique.