Rajeshwar Rajeshwar - 11 days ago 6
C++ Question

copying a std::vector to a qvector

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 ?

Answer

Look at:

std::vector<T> QVector::toStdVector () const

QVector<T> QVector::fromStdVector ( const std::vector<T> & vector ) [static]

From docs

Comments