[Development] QList

Philippe philwave at gmail.com
Wed Mar 29 23:17:31 CEST 2017


> I would really, really like to know why QVector is easier to use?

Following common methods are immediate. With std::vector, you need to
add boilerplate code to achieve the same.

QVector::insert
QVector::remove
QVector::value(int i, const T &defaultValue)
QVector::move
QVector::contains
QVector::operator+=(const QVector<T> &other)

Not to mention the many other convenient QVector methods.

And being able to use a QVector with O(1) by-value assigment, thanks to
COW, make it easy to use QVectors "as primitive types", with no
reasonning effort.

Philippe




More information about the Development mailing list