Friday, February 12, 2010

Programmer - Convert collection of T into collection of QVariant in Qt

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?

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails