Hi everyone,

I'm trying to display plots with QwtPlot in this way:
http://www.youtube.com/watch?v=-K9Aj49hHzA
Note how the curve is "eaten up" and not just moved.

My first approach looks like this:
Qt Code:
  1. void QwtTest::timerEvent(QTimerEvent * event)
  2. {
  3. for(int i = 0; i < 5; ++i)
  4. {
  5. yData_[currXPos_] = sin(2*pi*sinPos_/(0.169*dataSize_));
  6. ++sinPos_;
  7. currXPos_ = (currXPos_ + 1) % dataSize_;
  8. }
  9. ui.qwtPlot->replot();
  10. //everything until here is working, this makes the curve restart at the left hand side when the right hand side is reached
  11. //now i want to overpaint parts of the plot to get the free space between the 2 parts of the curve
  12. QPainter painter(ui.qwtPlot);
  13. painter.setPen(Qt::blue);
  14. painter.fillRect(ui.qwtPlot->rect(), QColor(0,0,0));
  15. //this part does not do anything...
  16. }
To copy to clipboard, switch view to plain text mode 

Do you have any suggestions?
Thanks in advance!