[SailfishDevel] pageStack navigation

Michael Neufing michael at neufing.org
Thu Jul 21 08:02:06 UTC 2016


Hi,

can you upload your project to GitHub or something?
Maybe this could help us to help you :)

Regards,
Michael

Am 21.07.2016 09:59, schrieb occirol:
> Hi ,
> 
> @Michael
> Thanks, I've tried that but it complains that the mainPage is not in
> the stack. So if the initialPage is set with mainPage, the mainPage is
> not in the stack ?!? I thought it was.
> 
> Regards,
> Fab
> 
> On 07/20/2016 09:52 PM, Michael Neufing wrote:
> 
>> Hi Fab,
>> 
>> have you already tried to use the following?
>> 
>> pageStack.pop(mainPage)
>> 
>> This will remove all pages above the specified page (here:
>> mainPage).
>> 
>> See [1] for more information.
>> 
>> Regards,
>> Michael.
>> 
>> [1]
>> 
> https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-pagestack.html/#pop-method
>> 
>> Am 20.07.2016 18:02, schrieb occirol:
>> 
>>> Hello everybody !
>>> 
>>> I can't figure out how to go back to the main page of an app and
>>> clear
>>> the stack of pages. Let me explain:
>>> 
>>> I've a main page, by selecting a menu entry push a page (lets call
>>> it
>>> page1). On this page1, calling a certain action, push another page
>>> 
>>> (call it page2, it is a dialog page) on the stack.
>>> 
>>> So in the stack, I have the following pages:  [MainPage, Page1,
>>> Page2]
>>> 
>>> But now, from page2, I want to go back to MainPage. So I did this
>>> first in the page2 code :    onAccepted: {
>>> pageStack.pop()
>>> }
>>> 
>>> But:
>>> 
>>> Warning: cannot pop while transition is in progress
>>> 
>>> Ok, so I tried this instead:
>>> 
>>> acceptDestination: Qt.resolvedUrl("MainPage.qml")
>>> acceptDestinationAction: PageStackAction.Pop
>>> 
>>> Still: Warning: cannot pop while transition is in progress
>>> 
>>> And doing this:
>>> 
>>> onAccepted: {         pageStack.pop(null, false)     }
>>> 
>>> Is working in term of results, but before going to the main page I
>>> see
>>> the page2 for a little while.
>>> 
>>> So, I should miss something here for sure. Any ideas or
>>> recommendation
>>> ? Maybe am I bad designing the navigation in the app ?
>>> 
>>> Thanks a lot !
>>> 
>>> Regards,
>>> 
>>> Fab
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to 
> devel-unsubscribe at lists.sailfishos.org


More information about the Devel mailing list