[Qt-interest] Break an infinite loop in the qt event loop.
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Tue Aug 24 11:12:51 CEST 2010
On 2010-08-24 Gopalakrishna Gopalakrishna Bhat wrote:
> ...
> I cannot transfer the control from the main thread since it has to do something on
> the a different widget.
You can ALWAYS transfer the control - or rather "data calculation" - into a worker thread, and once the calculation is done emit an asynchronous signal ("queued signals"), as mentioned in my previous post. The widget then would eventually receive the signal and either pick up the (latest) data from the thread or you pass (a copy of) the data as argument with the signal and update itself.
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list