Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QPainterPath multi-thread access
k06aaa last edited by
I'd like to use two threads:
- GUI thread uses const-only methods of QPainterPath object
- Second thread adds tens of thousands points to this objects
My GUI thread sometimes crushes while calling x.elementAt(i) or
x.elementCount() or while i'll trying to make deep-copy...
If I use QMutex while accessing to object - all work nice, but slow ...
I'd like not to deep-copy object. Is it possible?
You can only touch GUI items from the main thread, mutex or no.
miroslav last edited by
const methods can be called in a const context. They do not protect you from changes done from another thread while they are executed. So this approach will not work.