mrwolf
mrwolf

Reputation: 41

Qwt simpleplot example

I'm using qwt 6.1.3 for some Qt plotting work and just to test I created a new project, added the library, and pasted the simpleplot.cpp example code into Qtcreator.

A copy of the file can be view here: https://github.com/eiimage/qwt/blob/master/examples/simpleplot/simpleplot.cpp

The code has returned numerous errors.

curve->setSymbol(symbol);

The above code had to have a * put before symbol to prevent an error. Though I'm not sure if this is correct.

curve->setSamples(points);

Produces the error: 'class QwtPlotCurve' has no member named 'setSamples'. However, it's used in the example and also shows up in the document for that class. What might be causing this issue?

Thanks.

Upvotes: 0

Views: 4976

Answers (1)

mrwolf
mrwolf

Reputation: 41

This problem was one of documentation. All online documentation and examples provided use the methods setSamples and setRawSamples to set the curve points. This is incorrect. The appropriate method is setData and setRawData.

Upvotes: 1

Related Questions