PDA

View Full Version : Cyclical realtime QWT plotting



Gim6626
15th July 2013, 15:30
Hi!

I've got an application that receives data from serial port and plots it. Graph plots cyclically, i.e. when curve reach right border of graph, it continues from the beginning. Plotting code is based on realtime and oscilloscope examples, I use direct painting. The problem is how to erase old data, I need to do it partly (not like in oscilloscope example where whole screen cleans).

Should I just draw line with backgroung color pen or there are any better solution? I've tried to search similar problems on this forum but couldn't find answer.

Thanks in advance.

Uwe
16th July 2013, 05:44
Since Qt4 ( in Qt3 there was the XOR mode ) erasing parts from a widget is not possible - you always have to repaint.

Uwe