2 Attachment(s)
QwtSeriesData and boundingRect()
I was trying to use the QwtSeriesData (Qwt6.0.2) and found some confusion with boundingRect().
I have a data like below
Code:
class MyData : public QwtSeriesData<QPointF>
{
public:
virtual size_t size() const
{
return 200;
}
virtual QPointF sample
( size_t i
) const {
QPointF point
(i
*10,i
%2 ?
300 : 500);
return point;
}
virtual QRectF boundingRect
() const {
QRectF r
= qwtBoundingRect
(*this);
//<--this produce left image //QRectF r(0,0,2000,1000); <-- this produced right image
return r;
}
};
Attachment 7255Attachment 7256
It seems like the boundingRect is giving some scale factor to the real data. Is this a bug? by the way I set the QwtPlot to be autoscaling.
baray98
Re: QwtSeriesData and boundingRect()
I doubt, that the left image is from the code you have posted.
Uwe
Re: QwtSeriesData and boundingRect()
aha i found my woes...I have set QwtCurve::setYAxis(QwtPlot::yRight)...but it was not enabled.
Thanks uwe for your time