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

Hemalatha Venkataswamy Hemalatha.Venkataswamy at lntinfotech.com
Thu Mar 5 10:52:30 CET 2009


Hi,

For using QRunnable also, it seems we need to have class derived from 
QRunnable. is this true? I have few functions which need to be called when 
I click a button and this should be processed in a thread so that it does 
not disturb my main UI thread. 

Is there any example codes available?

Thanks a lot for your help.

Thanks With Regards
=================================
Hemalatha, 
PES (Communications) , BANGALORE
phone:  91 80 6624 2089
=================================

Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as: 

L&T Infotech Proprietary   L&T Infotech Confidential   L&T Infotech 
Internal Use Only   L&T Infotech General Business 

This Email may contain confidential or privileged information for the 
intended recipient (s) If you are not the intended recipient, please do 
not use or disseminate the information, notify the sender and delete it 
from your system. 



Boudewijn Rempt <boud at valdyas.org> 
03/05/2009 03:10 PM

To
Hemalatha Venkataswamy <Hemalatha.Venkataswamy at lntinfotech.com>
cc
qt-interest <qt-interest at trolltech.com>
Subject
Re: [Qt-interest] To start a thread without having a class derived from 
QThread






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


______________________________________________________________________



______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090305/7560c438/attachment.html 


More information about the Qt-interest-old mailing list