PDA

View Full Version : Plot with gap



Ozzy
17th January 2014, 07:34
Hi,

I try to plot a curve with a gap within the curve.
I just found this code from here: http://www.qtcentre.org/threads/49416-How-to-plot-discontinuous-curves-in-Qwt
that addresses the same problem. But when I try to implement this I get the error
'QwtSeriesData<QPointF>* QwtSeriesStore<QPointf>::d_series' is private within this context
that points to the line
const QPointF sample = d_series->sample(i);

Since I am new to this: can you give me a hint what could be wrong?

Thanks and best regards
Ozzy

Cah
17th January 2014, 12:20
Try

const QPointF sample = this->data()->sample(i);

instead of const QPointF sample = d_series->sample(i);

d_series is private(not protected) in the base class.

Ozzy
18th January 2014, 07:12
Hey,

thank you very much! This works perfect for me!!!

Best regards
Ozzy