Hi Uwe,
I realized that by calling replot on the polar plot anywhere in my program will cause any drawn qwtpolarcurve to disappear as well.
Could it be the way I do setdata?
Heres the code i used to pass into setdata:
class PolarData: public QwtSeriesData<QwtPointPolar>
{
public:
PolarData (const double* x, const double* y, size_t size) :
d_x (x),
d_y (y),
d_size (size) {}
virtual QRectF boundingRect
() const { if (d_boundingRect.width() < 0) {
d_boundingRect = qwtBoundingRect (*this);
}
return d_boundingRect;
}
virtual size_t size() const {
return d_size;
}
virtual QwtPointPolar sample (size_t i) const {
return QwtPointPolar (d_x[int (i)], d_y[int (i)]);
}
private:
const double* d_x;
const double* d_y;
size_t d_size;
};
class PolarData: public QwtSeriesData<QwtPointPolar>
{
public:
PolarData (const double* x, const double* y, size_t size) :
d_x (x),
d_y (y),
d_size (size) {}
virtual QRectF boundingRect() const {
if (d_boundingRect.width() < 0) {
d_boundingRect = qwtBoundingRect (*this);
}
return d_boundingRect;
}
virtual size_t size() const {
return d_size;
}
virtual QwtPointPolar sample (size_t i) const {
return QwtPointPolar (d_x[int (i)], d_y[int (i)]);
}
private:
const double* d_x;
const double* d_y;
size_t d_size;
};
To copy to clipboard, switch view to plain text mode
Bookmarks