PDA

View Full Version : Best way to draw x,y graphs



steg90
14th May 2007, 11:39
Hi,

Just some advice needed as to best way to draw x,y graphs and to scroll them. The graph would be in realtime and scroll along the x-axis.

In MFC I just store the y-coords in a buffer and use MoveTo and LineTo to draw the lines to an offscreen device context then blit the whole lot to the screen. Works ok in MFC, just wondering what is good way in Qt4?

Regards,
Steve

wysota
14th May 2007, 11:52
You can do it the same way, just substitute MFC calls with QPainter calls.