Hi All,
I want to paint contents in a multi-thread application using qt.
The qt runs in the main thread. I have a thread B to generate paint tasks and to send tasks to qt main thread. Currently, I call "mywidget.update" in thread B, the "mywidget.paintEvent(..)" will be triggered in main thread.
My problem is that I cannot pass any own data to "mywidget.paintEvent(..)" by using the method update. Currently I use a queue to store the data, I want to paint, and read it from paintEvent. But I have to synchronize this queue.
Is there any better way? Such as registering an own paint event. It will be very appreciated, if someone you post simple example or some links.