Qstirng转string
时间: 2023-08-25 08:16:00 浏览: 61
要将Qstring转换为std::string,有几种方法可以实现。首先,你可以使用QString的toStdString()函数将Qstring转换为std::string。例如,你可以使用以下代码进行转换:
string str = qstr.toStdString();
其中,qstr是你要转换的QString对象,str是转换后得到的std::string对象。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *2* [string与QString之间的转换](https://blog.csdn.net/lengyuezuixue/article/details/80684166)[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^chatsearchT3_1"}} ] [.reference_item]
- *3* [PyQt QString转成python stirng](https://blog.csdn.net/weixin_29898767/article/details/98845026)[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^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文