tags:

views:

51

answers:

1

Hello All, Can a class inherited from QThread and having run method can have other methods and can it be used like another normal ( not inherited from QThread) class?

+2  A: 

Yes, a class that inherits from QThread is still a normal class. However, care must be taken to synchronize calls to member functions that occur in a different thread context (i.e. calls from outside of the run method) as necessary. Read about Thread Support in Qt for more details. Herb Sutter has a nice collection of articles discussing different aspects of concurrency as well.

Judge Maygarden