QVariant appears to accept QList<QVariant>
and not QVector<QVariant>
nor QLinkedList<QVariant>
. Is it simply because it sees QList
, QVector
and QLinkedList
as fundamentally similar (in an abstract sense) data structures?
I'm adding and std::vector
to a QVariant
. If using only the Qt API and not a manual conversion, this requires two conversions:
- From
std::vector
toQVector
- From
QVector
toQList
PS: I'm aware that I can add std::vector
to QVariant
directly with this but I believe in that case it won't know that it's a vector of objects.