QVector object construction with iterators

c++, qt

Solution

As a work-around, you could use `fromStdVector`:

auto qv = QVector<double>::fromStdVector(std::vector<double>(
                         vec_old.begin() + 100, vec_old.end()));

Problem

Is it not possible to construct a new QVector object from iterators like C++ vectors?? ``` QVector<double> new_vec(vec_old.begin()+100,vec_old.end()) ``` I'm getting errors when I'm trying to do something like this.Also what is the best way to construct a new QVector object from a part of other QVector??

Original source