I have a QMainWindow with three widgets inside that are promoted to a class containing a subclassed QThread. They each draw on a local QImage in their rexpective qthread which is sent with a signal once its drawn and then rendered by calling update (mandlebrot example) from the slot. Is this safe or dangerous? They do not share any data, at least none that I am generating and am wondering what data they could be sharing that is outside of my coding range ie that is generated by Qt automatically.
Share
From the documentation:
So as long as you’re careful about the font issue on X11, don’t use any Pixmaps or Cursors (which are implemented as Pixmaps), and don’t try to paint onto the same image at the same time from multiple threads… it should work.
Note that in the Mandelbrot example, the QImage is passed by value over the signal (implicitly shared), meaning that if either thread attempts a write it will get its own copy.