PDA

View Full Version : Spawn a QThread in another QThread



david.corinex
19th December 2007, 01:59
Hi all,

I am new to the community and this is me first post.

My questions is:
Can I create a QThread instance inside another QThread instance which is not the main thread of the program? I heard that it can generate some strange behavior if to do so.

Any comments?

Thanks
Dave

marcel
19th December 2007, 06:41
Hello,

Yes, of course you can. The same rules apply as when starting the worker from the GUI thread.



I heard that it can generate some strange behavior if to do so.
What kind of behavior? If you run iin to it, post the problem here. I'm sure we can find a solution.

croftj
19th December 2007, 13:54
Hello,

Yes, of course you can. The same rules apply as when starting the worker from the GUI thread.


What kind of behavior? If you run iin to it, post the problem here. I'm sure we can find a solution.

Anytime you resort toi using threads you run the risk of strange behaviour. More threads mean all the more risk. Not that you should'nt use them, but they are a two edged sword. :cool: