I have two (alternative) functions working on data supplied by a sensor. The functions run in their own thread and emit a signal when the result is ready. This signal is connected to a slot of a UI widget, displaying the result. With one of the functions, this works well. When using the other however, the GUI starts to lag and soon freezes.
QDebug shows that data is still being processed though.
When running the code in the GUI-thread, there is no problem.
Might the problem be that the worker-thread produces data faster than the UI can draw it, leading to some lag due to the Qt::QueuedConnection? If so, what alternatives do I have? If not, what else can I check?