QStringList转QList<QString>
时间: 2024-04-25 16:25:40 浏览: 161
testQStringList.zip
可以使用以下代码将QStringList转换为QList<QString>:
QList<QString> list = rootDir.toVector().toList();
在这个例子中,我们使用toVector()将QStringList转换为QVector<QString>,然后使用toList()将QVector<QString>转换为QList<QString>。这样就可以将QStringList转换为QList<QString>。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [QStringList和QList<QString>使用区别和注意事项](https://blog.csdn.net/weixin_51559926/article/details/113869724)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
- *2* *3* [QStringList(QList<QString>)类型的将QString类型以int和其他类型的排序升序降序](https://blog.csdn.net/qq_40944337/article/details/115895347)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文