I'm planning to implement a widget for displaying curves of data plots. What I already know is that using simple widget painting do draw hundreds or thousands of little lines to represent a curve is too slow. So I see two possible approaches to do this more porfessionally.

1. Use an offscreen pixmap for drawing and reuse previously drawn parts as much as possible.

2. Use the graphics view framework.

What's your opinion? Is there maybe a third approach?