Re: Paintevent and update
1. If you have a separate thread receiving data, you just have to make sure that tread checks your socket often enough, right?
2. If you copy data to the widget, is the old data overwritten or added to existing data? If it is added, you already have all data, so no need to buffer. If it is overwritten, and your data has not been drawn on the widget yet, your data will be lost.
3. Update combines all drawing into one paint event, so everything will be drawn. If you have an animation type of widget that erases the previous data, than you are right that in your example of 4 data received, and combined in one paint event, you will see only the last data. In that case you can try if using the QWidget::repaint () function solves your problem.
4. If repaint() is slower then your data stream, and you don't mind seeing a delay between the received data and the widget drawing, you need to implement a buffer class that calls the repaint function as long as there is data that needs to be shown.
Wim