In Qt, how can I convert a typed collection of objects such as a QList<T> into a QList<QVariant>? I suppose I could construct a new list and copy the elements over, converting each to a QVariant along the way, but is there a shortcut?
In Qt, how can I convert a typed collection of objects such as a
Share
Thanks to the Qt IRC chat room. It was staring me right in the face.
The variant here is a
QList<QVariant>.