PDA

View Full Version : Using pthreads for a front end



kachofool
5th October 2009, 15:45
Hi all,

I'm designing a GUI front end for a multi threaded linux application. I don't have much sway on the application itself. The threading is implemented with pthreads.

I had some questions on how I should proceed.

* Can I continue to only use pthreads? The GUI only needs to run member functions which launch threads.

* I read that the GUI app needs to be launched from the 'main' thread... does this only apply if I'm using qthreads? Can I have one thread dedicated to the GUI and that's it? Currently the GUI doesn't do much outside of linking buttons to functions.

TiA,

-KF

yan
5th October 2009, 22:13
Hi.
Normaly you can use pthread with Qt as long as you don't use a QOBject. But the main thread should be use to run GUI.

And if you use pthread, you lost the Qt signal/slot between thread.