qt: fix threaded usage of QGraphicsScene pixmap painting
I noticed that QGraphicsScene
is not really suitable to be used under separate thread. I randomly got crashes when QGraphicsScene::render()
is used in separate threads, when I was dealing with another matter. Possibly there is QPixmap
painting going on internally, and it causes problems because of global caching behavior of QPixmap
.
- Use core function if the symbol is available.
- If not available, use
QGraphicsScene
. - If current thread is not the Qt GUI thread, run the operation in Qt GUI thread.
Edited by Fatih Uzunoğlu