Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在调用函数时存储QStringList在一个变量中。现在我想从变量中恢复这些数据。怎么做? QVariantsetDataQVariant
QStringList
QVariant
setData
编辑:我试过转换,但我似乎不明白它是如何工作的。
QVariant有toStringList()方法。
toStringList()