Converting QVariant to a QStringList

smallB picture smallB · Nov 25, 2011 · Viewed 7.9k times · Source

I have stored QStringList in a QVariant variable while calling setData function. Now I'd like to restore this data from QVariant variable. How to do it?

Edit: I tried convert but I don't seem to understand how it works.

Answer

Etienne de Martel picture Etienne de Martel · Nov 25, 2011

QVariant has a toStringList() method.