[Qt-qml] Sleeping in javascript

Alex alexlordax+qt at gmail.com
Mon Sep 27 21:59:19 CEST 2010


Hi,

I know javascript doesn't have a sleep() per se, but I've tried using
the setTimeout() function, which I thought was standard, like so:

        setTimeout("console.log(\"foo\")", 1000)

This is the result:

        ReferenceError: Can't find variable: setTimeout

What is the recommended way to pause/sleep within a javascript block?

Thanks,
Alex



More information about the Qt-qml mailing list