Hi,

when I use a ForLoop for initialing a QVector<double>, and have a setPen like this:
Qt Code:
  1. curve.setPen(Qt::red, 4, Qt::DotLine)
To copy to clipboard, switch view to plain text mode 
, the plot can not show the DotLine style. code is:


Qt Code:
  1. QVector<double> t(20);
  2. //t<<1<<2<<3<<4<<5<<6<<7<<8<<9; //if I replace this line with under ForLoop the problem is solved.
  3. for(int i=0;i<10;i++)
  4. {
  5. t[i]=i;
  6. }
  7. curve.setSamples(t,t );
  8. curve.setPen(Qt::red, 4, Qt::DotLine);
  9. curve.attach(&plot);
  10.  
  11. plot.show();
To copy to clipboard, switch view to plain text mode 

I uploaded a picture of this. Thanks for any help
NotShowStyle.png