I tried copy content of one vector to a QVector
using the following
std::copy(source.begin(), source.end(), dest.begin());
However the destination QVector
still is empty.
Any suggestions ?
Look at:
std::vector<T> QVector::toStdVector () const
QVector<T> QVector::fromStdVector ( const std::vector<T> & vector ) [static]
From docs
If you are creating a new QVector
with the contents of a std::vector
you can use the following code as an example:
std::vector<T> stdVec;
QVector<T> qVec = QVector<T>::fromStdVector(stdVec);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With