<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1"><font face="Courier New, Courier, monospace">Hi ,</font></font><br>
<br>
<font face="Courier New, Courier, monospace" size="-1">@Michael</font><br>
<font size="-1"><font face="Courier New, Courier, monospace">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.<br>
</font></font><br>
<font size="-1"><font face="Courier New, Courier, monospace">Regards,</font></font><br>
<font size="-1"><font face="Courier New, Courier, monospace">Fab<br>
<br>
</font></font>
<div class="moz-cite-prefix">On 07/20/2016 09:52 PM, Michael Neufing
wrote:<br>
</div>
<blockquote cite="mid:e0b13a3c93021a65775d333d470d2a97@neufing.org"
type="cite">Hi Fab,
<br>
<br>
have you already tried to use the following?
<br>
<br>
pageStack.pop(mainPage)
<br>
<br>
This will remove all pages above the specified page (here:
mainPage).
<br>
<br>
See [1] for more information.
<br>
<br>
Regards,
<br>
Michael.
<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-pagestack.html/#pop-method">https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-pagestack.html/#pop-method</a><br>
<br>
Am 20.07.2016 18:02, schrieb occirol:
<br>
<blockquote type="cite">Hello everybody !
<br>
<br>
I can't figure out how to go back to the main page of an app and
clear
<br>
the stack of pages. Let me explain:
<br>
<br>
I've a main page, by selecting a menu entry push a page (lets
call it
<br>
page1). On this page1, calling a certain action, push another
page
<br>
(call it page2, it is a dialog page) on the stack.
<br>
<br>
So in the stack, I have the following pages: [MainPage, Page1,
Page2]
<br>
<br>
<br>
But now, from page2, I want to go back to MainPage. So I did
this
<br>
first in the page2 code : onAccepted: {
<br>
pageStack.pop()
<br>
}
<br>
<br>
But:
<br>
<br>
Warning: cannot pop while transition is in progress
<br>
<br>
Ok, so I tried this instead:
<br>
<br>
acceptDestination: Qt.resolvedUrl("MainPage.qml")
<br>
acceptDestinationAction: PageStackAction.Pop
<br>
<br>
Still: Warning: cannot pop while transition is in progress
<br>
<br>
And doing this:
<br>
<br>
onAccepted: { pageStack.pop(null, false) }
<br>
<br>
Is working in term of results, but before going to the main page
I see
<br>
the page2 for a little while.
<br>
<br>
So, I should miss something here for sure. Any ideas or
recommendation
<br>
? Maybe am I bad designing the navigation in the app ?
<br>
<br>
Thanks a lot !
<br>
<br>
Regards,
<br>
<br>
Fab
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>