You could change the data directly, but with locking!
For example:
Your thread class has a QList<QPointF> which contains all points, old ones and generated ones. The gui polls for data using a QReadLocker every 40 - 50 ms (less frequent is better), the the worker thread puts new points in with the QWriteLocker.
The other way round would also work:
The gui thread holds the data and the worker thread notifies a class directly that there are new points, locking is also necessary here.
So: Signal/Slot is a good solution for multithreading if you don't want the data fast but have a very simple and stable code without knowing much about threading. Locking is more complicated and can also lead to slow code, if you lock too often....
Bookmarks