Set data of qtchart by pointer
Hi. I have two large arrays (unsigned integer 64) with same length, is it possible to pass these arrays via two pointers as values of Xaxis and Yaxis? Thanks.
Not directly, you can do:
const auto arrLen = std::extent<declype(arrX)>::value; Q_ASSERT(std::extent<declype(arrY)>::value == arrLen); /* QXYSeries* m_series; <- in header and created on the heap*/ for(decltype(arrLen) i=0;i<arrLen;++i) m_series->append(arrX[i],arrY[i]);