QT on toradex VF61 SBC WINCE6.0
-
Hi and welcome to devnet,
What should that endless loop do ?
-
Then implement that in a QThread subclass so your loop won't interfere with your GUI
-
@SGaist Thanks for your suggestion , do you have any examples .See all my widgets are in my mainwindow polling with the thread is not a problem but how i will communicate with my widgets .Since i am learning qt for just a while so don't mistake me if the question is silly.
-
You can take a look at the Mandelbrot example
-
You can take a look at the Mandelbrot example
@SGaist Thank you, the example is very much related to my requirement and i will try to implement it.In the Mandelbrot example the render thread has a run function but i am unable find where the thread is initiated.I have read the QThread class and checked some examples the QThread will initiate with the start function call which will initiate the override run function .Can you please explain , it will help me to proceed further.
-
If you reimplement run, you do all the initialization at the start of the run method before your loop.
-
I think you have misunderstood my question or may be i am wrong. I will rephrase my question.
-
To execute a thread you should call the run function using start method,this is as per QThread class information.
-
But in the Mandelbrot example I am unable to find that function call.
I want know how the thread is started where is the entry point to that thread.
Thank You.
-
-
start is called in the render method
-
You're welcome !
In your case you can just start the thread as soon as you need it