M
M
Michael.2011-11-17 15:53:17
Qt
Michael., 2011-11-17 15:53:17

Qwt: how to pass data to a graph?

There is a need to display the graph using Qwt (I need to display at least a segment of 1x1 mm).
At first I looked in the examples attached to Qwt, but there is something so much heaped up with inheritance from different classes.
After looking at the topic - habrahabr.ru/blogs/qt_software/82614/ , I decided to do this:
curve->setData (array1, array2, Size);
but an error occurs: something with incorrect data:
void QwtPlotSeriesItem::setData(QwtSeriesData*) [with T = QPointF]
(I would give the full text of the error, but it displays hieroglyphs in my console).
Tell me, is it possible to simply convert my two arrays with data so that their function accepts them?
PS Another example from the Internet: qtlinux.narod.ru/use_qwtplot.htm
but they do the same through arrays.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Riateche, 2011-11-18
@kulinich

Here is the simplest method:

void QwtPlotCurve::setSamples (const QVector< double > & xData, const QVector< double > & yData )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question