PDA

View Full Version : slow response from main GUI while thread is running



dmtung
11th December 2009, 00:43
I have a QT main GUI that runs a QThread object in WIndows XP and QT4 v4.4.3

My question is:

what tips do folks have for improving main GUI responsiveness while a thread spawned from main GUI is running? There's stuff that updates on the main GUI from the thread, but it takes 5 seconds or more for the GUI's event loop to handle any mouse event.

should i use timers or mutex's or some other trick to resolve this?

thanks

sunil.thaha
11th December 2009, 05:56
I recommend that you read this article by wysota. Provides lots of insight into this topic

http://doc.trolltech.com/qq/qq27-responsive-guis.html

squidge
11th December 2009, 07:53
A common mistake is thinking that slots are being executed in the spawned thread, when they are actually being executed from the main thread, and thus blocking the gui updates.