Op 27/03/2017 om 09:22 schreef Martin Smith: > > > A vector is a collection of points and so is a polygon. Both > are even ordered. > > > vector<point> is an ordered collection of points, but a QVector can > contain anything; QVector<void*> can even contain unlike things, which > is truly a tuple. So the problem here is the name QVector. The basic > collection should be called QTuple or QArray, and QVector should mean > QTuple<QPoint>. > Well, actually, QVector<void *> cannot contain unlike things. It can contain only untyped pointers. Of course these can point to whatever you want - unlike to what other pointers in the same QVector are pointing to or not - but the pointers are still of the same type. Note that the objects pointed to are also not contained in the QVector. They are located somewhere else, not managed by the vector. So no, nothing like a tuple at all.
André
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development