Reputation: 2503
I can't find a way to convert my QList<T>
to a QVariant
.
There's a constructor QVariant(const QList<QVariant> &val)
, but no constructor for QList<T>
, is it possible to convert directly a QList<T>
?
Upvotes: 3
Views: 5362
Reputation: 312
Example
QList<int> ints{1,2,3};
QVariant var = QVariant::fromValue<QList<int>>(ints);
Upvotes: 4