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 ________________________________ From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of Andrey Kozhevnikov [coderusin...@gmail.com] Sent: Wednesday, July 16, 2014 7:01 PM To: devel@lists.sailfishos.org Subject: Re: [SailfishDevel] A welcome dialog and pageStack's operation in progress. do not use onCompleted in this case. use status == PageStatus.Active instead 16.07.2014 14:58, Marcin M. пишет: I'd like to open a welcome dialog at startup which can be disabled by a user. Page { id: mainPage function openWelcomeDialog() { var component = Qt.createComponent("WelcomeDialog.qml") var popup = component.createObject(mainPage) popup.open() } Component.onCompleted: openWelcomeDialog() // ... } In fact [W] unknown:90 - file:///usr/lib/qt5/qml/Sailfish/Silica/PageStack.js:90: Error: Cannot push while operation is in progress: push happens. What's done wrong? -- Marcin _______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org<mailto:devel-unsubscr...@lists.sailfishos.org>
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org