Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Introducing Delay In Qt Application

From Wiki
Jump to: navigation, search

This code snippet shows how to introduce delay in our application using QThread::msleep().

Article Metadata
Tested with
Devices(s): Emulator / desktop / device
Platform(s): All Qt Supported
Keywords: QThread
Created: skumar_rao (29 Nov 2010)
Last edited: hamishwillee (11 Oct 2012)

First create a sleeper thread:

class SleeperThread : public QThread
static void msleep(unsigned long msecs)

You can then use this as shown below:

This page was last modified on 11 October 2012, at 01:17.
85 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.