Hello i am new to QT and QWT and i am doing an application that must plot and do some calculus in phasors data coming from ADs.

At first i am using a QTimer to simulate the IRQ from the device driver, the QTimer calls a funcion from 200ms to 200ms.
Inside the function i am doing this

Qt Code:
  1. curve1->setSamples(buff_x,buff_sin_results[tosqueira],1000);
  2. curve1->attach(this->ui->qwtPlot);
  3.  
  4. curve2->setSamples(buff_x_2,buff_sin_results_2[tosqueira],1000);
  5. curve2->attach(this->ui->qwtPlot);
  6.  
  7. curve3->setSamples(buff_x_3,buff_sin_results_3[tosqueira],1000);
  8. curve3->attach(this->ui->qwtPlot);
  9.  
  10. curve4->setSamples(buff_x_4,buff_sin_results_4[tosqueira],1000);
  11. curve4->attach(this->ui->qwtPlot);
  12.  
  13. ui->qwtPlot->replot();
To copy to clipboard, switch view to plain text mode 
These are 4 buffers that i pre-calculated in some other function and i am just plotting them.
It works but is it the best way to do it performance wise?

Thank you very much