Hello,
I have a question regarding interruption of paint in paintEvent() / QPainter.
Basically what I want to achieve is stop / interrupting paint of QImage / QPixmap by QPainter.
What I do now is, in paintEvent() I paint QImage by QPainter. Everything works fine but I want to interrupt paint process so it would work like this:
- I paint current image next image paint is requested and I want interrupt paint and start painting next image.
My current "workflow" for image paint:
- [another thread] -> read image
- signal / slot to paint widget
- [main thread] paint widget in paintEvent by QPainter paints image
- user now can request another image so load do starts but now there is a "lag" because next image paint is started when current image is painted on.
to draw image I use .drawImage / .drawPixmap functions
Is there a way to achieve that?
Thanks in advance for reply.
Bookmarks