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> ?
Example
QList<int> ints{1,2,3};
QVariant var = QVariant::fromValue<QList<int>>(ints);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With