PDA

View Full Version : How to access data of a QwtPlotCurve with Qwt5.2



jomarin
12th December 2008, 10:28
Hi everyone,

I'm trying to fix a bug with a very simple QwtPlotCurve in a QwtPlot that I have on Solaris and not on windows :(

I need to access the QwtPlotCurve data to check that the values are correct, but using the

double x (int i) const
http://qwt.sourceforge.net/class_qwt_plot_curve.html

function, I get following error message :

no matching function for call to `QwtPlotCurve::x(int)'

I'm using Qwt 5.2, it seems that this method has been removed.
How can I acces the data values of a QwtPlotCurve with Qwt 5.2 ?

Thanks in advance,

Joel.

Uwe
13th December 2008, 13:04
curve->sample(i).x();

Uwe

jomarin
18th December 2008, 08:43
Thanks a lot uwe.

For information, I resolved my problem by using the
setRenderHint(QwtPlotItem::RenderAntialiased,true)

method on the plot and then everything worked fine.

Without the RenderAntialiased mode, the display was correct on windows, but I could'nt se more than a straight line on solaris.

Setting the RenderAntialiased mode fixed the problem :)

Joel.