[SailfishDevel] pageStack navigation

Dylan Van Assche dylan.van.assche at protonmail.com
Wed Jul 20 16:36:13 UTC 2016


You should add this:


This will prevent the issue but it will give you another bug: only one page will be popped.

You can fix it like this:

pageStack.completeTransition() // This will pop the page directly.

-------- Original Message --------
Subject: [SailfishDevel] pageStack navigation
Local Time: July 20, 2016 6:02 PM
UTC Time: July 20, 2016 4:02 PM
From: developer at nordan.ch
To: devel at lists.sailfishos.org

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: {


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 !


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20160720/a6e14fcf/attachment.html>

More information about the Devel mailing list