The code where I set the data to the cruve is :
Qt Code:
  1. liste_courbe->append(curve);
  2.  
  3.  
  4. myPlot = new QwtPlot("XXXXX",this);
  5. mainLayout->addWidget(myPlot);
  6. this->setLayout(mainLayout);
  7.  
  8.  
  9.  
  10.  
  11. for(int k=0; k<nbParam; k++)
  12. {
  13. QList<QByteArray> liste_SL2;
  14. QList<QByteArray> liste_val;
  15.  
  16. ....
  17.  
  18. nbValeur = liste_SL2.size()-1;
  19.  
  20. QVector<double> x;
  21. QVector<double> y;
  22.  
  23. for (int i=0; i<nbValeur; i++)
  24. {
  25. double newX = liste_SL2.at(i).toDouble();
  26. double newY = liste_val.at(i).toDouble();
  27.  
  28. if(x.contains(newX))
  29. {
  30. if(!y.contains(newY))
  31. {
  32. x.append(newX);
  33. y.append(newY);
  34. }
  35. }
  36. else
  37. {
  38. x.append(newX);
  39. y.append(newY);
  40. }
  41.  
  42. liste_courbe->at(k)->setData(x.data(), y.date(), x.size());
  43.  
  44. liste_courbe->at(k)->attach(myPlot);
  45.  
  46. }
To copy to clipboard, switch view to plain text mode 



btw: this forum has a subforum especially for qwt, I suggest to put your qwt-related questions there next time
Ok sorry, I'll post to the subforum next