10-01-2013 06:35 AM
Is it possible for me to push a new page after popping the current page?
For example, from main.qml I push page1.qml then push page2.qml and pop page1.qml? (so the one left in the stack are main.qml -> page2.qml)
Any ideas on how can I do this?
Thanks in advance.
Solved! Go to Solution.
10-01-2013 06:42 AM
Of course! :-)
You can use NavigationPane's remove() function...
10-01-2013 06:44 AM
However think carefully about how confused your user may be if doing this as he/she will expect to go back to one page and instead be returned to another.
So either clearly indicate this is going to happen or rethink whether the UI flow can be done another way (i.e. Sheet, dialog).
10-01-2013 06:44 AM
10-01-2013 07:13 AM - edited 10-01-2013 07:29 AM
the reason I'm doing this is because from page2.qml I might need to push page1.qml again (which consists of a list view) and hence when I push page1.qml from page2.qml, the list view doesn't load (it just appears empty) unless page1.qml doesn't exist in the stack then the list view loads perfectly. however, I tried using .remove but my listview still doesn't load. any ideas?
ListView *listView = Application::instance()->scene()->findChild<ListVi
10-01-2013 07:30 AM
10-01-2013 07:33 AM - edited 10-01-2013 07:34 AM
Without looking at your code it's hard to say but in all likelihood the ListView is not in the scene graph when you attempt to access it and load the data. I'm assuming here you are referencing it from C++ using the findChild() method.
[Edit] You are, must have skipped that bit in your posting.
10-01-2013 07:37 AM
If this *is* the case then the solution is to wait to update the ListView until you know it is created (using one of the many signals available) rather than trying to work-around it by messing with the navigation stack.
If you are unable to come up with a solution from this, please close this thread 'Mark as Solution' as the original question has been answered and open a new one with the new problem, posting your code.