Hi all,

Qt Code:
  1. QwtSeriesData<QPointF>* coordinates = new FunctionData(::sin);
To copy to clipboard, switch view to plain text mode 

Considering the line above, I have a question on how to read the values from the QwtSeriesData<QPointF> object. The code I am dealing with accept both constructions below, but the second one is preferable.

Qt Code:
  1. MyPlotCurve *sinCurve = guiComVisGraf->createCurve("Seno", coordinates );
  2. MyPlotCurve *sinCurve = guiComVisGraf->createCurve("Seno", size, x, y);
To copy to clipboard, switch view to plain text mode 

So I am trying this

Qt Code:
  1. int size = coordinates->size();
  2. double *x = new double[size];
  3. double *y = new double[size];
  4. for(int i = 0; i < size; i++){
  5. x[i] = coordinates->sample(i).x();
  6. y[i] = coordinates->sample(i).y();
  7. }
  8. MyPlotCurve *sinCurve = guiComVisGraf->createCurve("Seno", size, x, y);
To copy to clipboard, switch view to plain text mode 

This way I am reading "0" for all "i". There is probably a neat misunderstanding in my code, I would like to ask for help in find it. Thanks in advance.