Reputation: 532
I am working on an application in PyQt4.
In my application I will need to draw on a QImage according to data from two sources
(for example, imagine periodically-called irregularly-timed methods which edit the image)
For this I'll need to edit the QImage using two instances of QPainter, and both might be working on the image simultaneously.
Will this work fine without special handling?
If no, what are the additional measures I must take to ensure that all the simultaneous edits happen smoothly without loss?
Upvotes: 1
Views: 513
Reputation: 22272
To quote the docs for QPainter::begin():
Warning: A paint device can only be painted by one painter at a time.
So you would need to synchronize painting to that image.
Upvotes: 4