Thanks for your attention! I've read the Mandelbrot example which is just fit my problem. And the rendering thread pass a QImage object instead of a vector to the GUI thread. I followed this and solved my problem. It seems that it is more difficult to manage the vector.
Now I have a little problem. below is my rendering thread's run method.
void MyThread::run()
{
render(); // is this unblock?
exec();
}Because I have a QTimer,so I need to add the "exec()" at the bottom. but if the "render()" fuction is executed in block-mode. How can the rendering thread start its own event-loop when the render fuction is being executed? (But now ,it just works, the readering thread can receive the Timer's timeout signals,and then pass the QImage to the GUI thread!)
Bookmarks