Skip to content

Instantly share code, notes, and snippets.

@M4rtinK
Created October 21, 2014 20:22
Show Gist options
  • Save M4rtinK/ab4e670d5067f8bc0e8c to your computer and use it in GitHub Desktop.
Save M4rtinK/ab4e670d5067f8bc0e8c to your computer and use it in GitHub Desktop.
property var mapPageLoader : null
Connections {
id : mapPageLoadedConnection
target : mapPageLoader
ignoreUnknownSignals : true
onStatusChanged : {
rWin.log.debug("STATUS! " + mapPageLoader.status)
if (mapPageLoader.status == Component.Ready) {
rWin.log.info("map page component loaded")
var incubator = mapPageLoader.incubateObject(rWin, {}, Qt.Asynchronous)
if (incubator.status != Component.Ready) {
incubator.onStatusChanged = function(status) {
if (status == Component.Ready) {
rWin.log.info("map page object instantiated")
rWin.pushPage(incubator.object, rWin.animate)
//startupLabel.opacity = 0
}
}
} else {
rWin.log("map page object instantiated immediately")
rWin.pushPage(incubator.object, rWin.animate)
//startupLabel.opacity = 0
}
}
if (mapPageLoader.status == Component.Error) {
rWin.log.info("map page loading failed")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment