read my sig
All your timer does is send signal. you can put your timer anywhere. Why does it have to be in heavy processing thread?
read my sig
All your timer does is send signal. you can put your timer anywhere. Why does it have to be in heavy processing thread?
Last edited by amleto; 4th August 2012 at 15:57.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
I can redesign and put a timer outside the processing thread. Still for my own knowledge i would like to know it there is a way of installing the QTimer inside a Thread.
Sorry for not pasting the original code. It is not my property and i cannot share it. As it is quite big i just tried to extract the highlights.
You can put a timer anywhere you want, including in threads. But if you block the event loop of that thread then signals wont fly out and slots inside wont be executed. It's pretty straight forward.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
I agree with you. I do not know how to make these timer events propagate in my while() loop. According to docs: QCoreApplication:rocessEvents()
"Processes all pending events for the calling thread according to the specified flags until there are no more events to process."
So putting it inside a while() loop should do the job - sadly it does not, ..or i am doing something wrong.
Thank you anyway.
you could be doing any number of wrong things so I'm not going to speculate any further without code.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
Bookmarks