当前位置:网站首页>How to wrap qstring strings
How to wrap qstring strings
2022-07-02 08:00:00 【Licht powder】
problem : There is such a long section of characters , Want to wrap

Solution 1 : With the help of append
QString str = "\n";
QString sXml = "<message>";
sXml.append(str);
sXml = sXml + "<head packtype=\"21\" sessionid=\"31\" fromip=\"192.168.84.244\" toip=\"\"> ";
sXml.append(str);
sXml = sXml + "</head>";
sXml.append(str);
sXml = sXml + "<body cmdid=\"B000\" stbip=\"192.168.84.244\"></body>";
sXml.append(str);
sXml = sXml + "</message>";Effect display :

Solution 2 : emmm Directly after the string to be converted \n It's OK, too :
QString sXml = "<message> \n <head packtype=\"21\" sessionid=\"31\" \n fromip=\"192.168.84.244\" toip=\"\"></head>\n <body cmdid=\"B000\" stbip=\"192.168.84.244\"></body> \n</message>";
The effect is as follows :

I have a question:
Written by a blogger , I used to remember that it was impossible .
![]()
however ! however ! I tried two possibilities of this statement today , Can achieve the effect of line feed , It's ridiculous !!!
The first one is :
QString sXml = "message" ;
sXml = sXml + "\nhead";effect :

The second kind :
QString sXml = "message" ;
sXml = sXml + "\n" + "head";effect :
![]()
So does my blog record a record ???????
alas !!!!!!!
边栏推荐
- Feature Engineering: summary of common feature transformation methods
- Where do you find the materials for those articles that have read 10000?
- A brief analysis of graph pooling
- CVPR19-Deep Stacked Hierarchical Multi-patch Network for Image Deblurring论文复现
- SQL server如何卸载干净
- Command line is too long
- Handwritten call, apply, bind
- Solve the problem of latex picture floating
- It's great to save 10000 pictures of girls
- What if the notebook computer cannot run the CMD command
猜你喜欢

【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》

【FastDepth】《FastDepth:Fast Monocular Depth Estimation on Embedded Systems》
![[CVPR‘22 Oral2] TAN: Temporal Alignment Networks for Long-term Video](/img/bc/c54f1f12867dc22592cadd5a43df60.png)
[CVPR‘22 Oral2] TAN: Temporal Alignment Networks for Long-term Video

静态库和动态库

11月24号,我们为“满月”庆祝

Semi supervised mixpatch

【学习笔记】反向误差传播之数值微分

【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》

【FastDepth】《FastDepth:Fast Monocular Depth Estimation on Embedded Systems》

Memory model of program
随机推荐
【Mixup】《Mixup:Beyond Empirical Risk Minimization》
w10升级至W11系统,黑屏但鼠标与桌面快捷方式能用,如何解决
笔记本电脑卡顿问题原因
The hystrix dashboard reported an error hystrix Stream is not in the allowed list of proxy host names solution
open3d环境错误汇总
联邦学习下的数据逆向攻击 -- GradInversion
The internal network of the server can be accessed, but the external network cannot be accessed
Solve the problem of latex picture floating
【Mixed Pooling】《Mixed Pooling for Convolutional Neural Networks》
jetson nano安装tensorflow踩坑记录(scipy1.4.1)
【Paper Reading】
Embedding malware into neural networks
Hystrix dashboard cannot find hystrix Stream solution
【MobileNet V3】《Searching for MobileNetV3》
Specification for package drawing
What if the laptop can't search the wireless network signal
Mmdetection model fine tuning
【Hide-and-Seek】《Hide-and-Seek: A Data Augmentation Technique for Weakly-Supervised Localization xxx》
业务架构图
A brief analysis of graph pooling