当前位置:网站首页>Qstring to const char*
Qstring to const char*
2022-06-30 07:00:00 【HL_ Aeolus】
QString str(“hello world!”);
Turn into const char *
- const char * arr = str.toStdString.c_str();
- const char * arr = str.toLatin1().constData(); //toUtf8()
Turn into char *
3. char * arr = str.toStdString.data();
4. char * arr = str.toLatin1().data(); //toUtf8()
…
Specially ,char * turn QString It's simpler
- QLatinlString(const char *) -> QString(QLatinlString str)
- QString(const char *)
- QString QString::fromStdString(const std::string &str)
边栏推荐
猜你喜欢
随机推荐
元宇宙由哪些底层技术支撑?
[mask RCNN] target detection and recognition based on mask RCNN
Finished product upgrade procedure
Mysql5.7 compressed version installation tutorial
SOC project AHB_ SD_ Host controller design
15 minutes learn to use JWT
【Hot100】11. 盛最多水的容器
Imxq Freescale yocto project compilation record
Egret engine P2 physics engine (2) - Funny physical phenomenon of small balls hitting the ground
【申博攻略】五.专家推荐信模板
六,购物⻋与订单
Cluster distributed
[Hot100]回文子串 与 最长回文子串
Vscode returns the previous cursor (previous browse position)
原来你是这样的数组,终于学会了
0 basic job transfer software test, how to achieve a monthly salary of 9.5k+
Deploying web projects using idea
Porting RT thread to s5p4418 (II): dynamic memory management
Use of sscanf function
【模糊神经网络】基于模糊神经网络的移动机器人路径规划









