[SailfishDevel] A welcome dialog and pageStack's operation in progress.
J-P Nurmi
jpnurmi at gmail.com
Wed Jul 16 21:45:50 UTC 2014
On Wed, Jul 16, 2014 at 11:25 PM, Matthew Vogt <matthew.vogt at jolla.com> wrote:
>
> Hi, 'Page.status' is the correct property to watch for avoiding this problem.
>
> Here is an example of what you could do:
>
> import QtQuick 2.0
> import Sailfish.Silica 1.0
>
> ApplicationWindow {
>
> initialPage: Component {
> Page {
> anchors.fill: parent
>
> Label {
> anchors.centerIn: parent
> text: 'Main page'
> }
>
> property bool showSplash: true
> onStatusChanged: {
> if (status == PageStatus.Active && showSplash) {
> showSplash = false
> pageStack.push(splashPage)
> }
> }
> }
> }
>
> Component {
> id: splashPage
>
> Page {
> Label {
> anchors.centerIn: parent
> text: 'Splash page'
> }
> }
> }
> }
>
> Thanks,
> Matt
Hi Matt,
Notice that essentially the same problem occurs when a dialog/page is
triggered by an external event. User navigates the UI meanwhile eg. a
network event triggers a dialog => PageStack is busy so it just bails
out and user misses the dialog. As a workaround, waiting until
PageStack is no longer busy gets pretty ugly.
--
J-P Nurmi
More information about the Devel
mailing list