qt - Using QList as the input for QwtPlotCurves setSamples -


i have 2 qlist (xlist, ylist) saves dynamic data. want use these input of qwtplotcurves setsamples. after check documentation:

void    setsamples (const double *xdata, const double *ydata, int size) void    setsamples (const qvector< double > &xdata, const qvector< double > &ydata) void    setsamples (const qvector< qpointf > &) 

it seems not support qlist. there workaround or have overload it?

julio

there method in qlist returns const qvector.

so:

setsamples( xlist.tovector(), ylist.tovector()  ) 

check qvector qlist::tovector () const


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -