Hi @Md0ngo said in QThread signals|calls to QChart are blocking the GUI:
After so much time lost, solved it!!
It seemed to be the fault of the default QSeries implementation... Series.append() apparently emit a couple of signals and resize the inner vector which contain the QPoints. This combined to a O(knĀ²) loop totally messes up the main event loop.
It was "as easy" as refractoring the code so the thread builds up a QVector of QPoints, then signals each vector to the chart and it calls to series.replace() instead of append(), that is actually faster and lighter.
great that you were able to fix it yourself, and I learned something new and important about QCharts thank you ;-)
I was about to give up after trying the moveToThread way without success, but I was lucky enough to get the solution after finding this.
So, not a matter of Qthreads after all.. Now I'm wondering whether refracting the code to create a dedicated event-loop was worth it or not.
If an actual worker class is now replacing your infinite while loop, that you posted in the op, than yes it is, definitely!
Don't forget to set your topic to solved ;-)