Reputation: 45
I want to append a QVector
in a QList
but the QVector
does not append. The size does not change. I try this with:
y.value(i).append(var);
Variable y
is declared as QList<QVector<double>> y;
.
Upvotes: 0
Views: 617
Reputation: 24416
QList::value() returns a copy of the element at the given index, not a reference, so modifying it has no effect. Try operator[] instead.
Upvotes: 4