View Full Version : Use QRunnable without QThreadPool

18th August 2011, 10:28
Is it useful to use a QRunnable without a QThreadPool. I saw a program where the a QRunnable is instanitated and then the method run is called.
What's the advantage for this, because I didn't see a QThreadPool.

Runs the run method in it's own thread?

thank u

18th August 2011, 10:54
There is no advantage. It's just like called an ordinary method of an ordinary class. No threading is involved.

18th August 2011, 11:02
ok thank u for your reply.
another little question = ):

If I instantiate a QEventLoop in a class and call exec(), nothing happens until a connected slot calls loop.quit();
After the quit call, the methods after the exec-call are processed? is this correct?

QEventLoop loop;