Hi,
I have a requirement, wherein i receive data from a socket, to be continuously drawn on the widget.
The socket is pumping data with the worst case speed of 1ms.
I have a thread to receive the data, after reception i copy the data into the widget's member to be drawn, then i call the update() function.
here i have two problems
1.Update requires some time to finish its job, but by this time there is a possibility of receiving new data.
here i may miss soem data from socket or painting for that set is incomplete ...
2.For the sake of optimization, its said that "Calling update() several times normally results in just one paintEvent() call." so in this case what happens to the data which is to be drawn for each update?
i.e. lets say i received 4 data which would result in calling 4 updates and ideally the widget was supposed to be redrawn 4 times.
but due to this optimization i may have only the last data read.
Can anybody suggest what needs to be done for this, i think i need to implement a buffer, but i dont know how to pass this info for PaintEvent.
Thanks in advance
Bookmarks