QCustomPlot
has setData
function that accepts const variable.
Is there a way to QCustomPlot
can be use to plot dynamically?
QCustomPlot
setData
function accepts constant vectors, but I have to change the values in this vector dynamically.
const QVector<double> yval(cl);
const QVector<int> xval(cl);
for (int j = 0; j<cl; j++)
yval[j] = ui->tableView->model()->data(ui->tableView->model()->index(5, j)).toDouble();
for (int j = 0; j<cl; j++)
{
xval[j] = j;
}
ui->widget->graph()->setData(xval, yval);