Ok, before we start. Do NOT touch GUI in a worker thread. From Qt docs: "Although QObject is reentrant, the GUI classes, notably QWidget and all its subclasses, are not reentrant. They can only be used from the main thread."
You can do some expensive calculation in worker threads, but you must deliver the results to the GUI thread where you can change the GUI to reflect the results. You can use signals and slots or custom events to deliver calculated results to the main GUI thread. Or perhaps you could even use the higher level threading API of Qt Concurrent.






Reply With Quote
Bookmarks