[Qt-interest] To start a thread without having a class derived from QThread

Boudewijn Rempt boud at valdyas.org
Thu Mar 5 10:40:51 CET 2009


On Thu, 5 Mar 2009, Hemalatha Venkataswamy wrote:

> Hi,
> 
> We have a GUI developed with single threaded application and we have a 
> function which is asynchronus and is called inside my main thread, I need 
> to call this function in a seperate thread but i dont want to have a class 
> derived from QThread and call the function with QThread's start() call.
> 
> Is it possible to start a thread without having a class derived from 
> QThread?

Yes, using QRunnable and QThreadPool.

Boudewijn




More information about the Qt-interest-old mailing list