当前位置:网站首页>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 !!!!!!!
边栏推荐
- Open3d learning note 3 [sampling and voxelization]
- Dynamic extensible representation for category incremental learning -- der
- Remplacer l'auto - attention par MLP
- 11月24号,我们为“满月”庆祝
- 常量指针和指针常量
- [multimodal] clip model
- How to turn on night mode on laptop
- How do vision transformer work? [interpretation of the paper]
- Thesis writing tip2
- Open3d learning notes 1 [first glimpse, file reading]
猜你喜欢

服务器的内网可以访问,外网却不能访问的问题

将恶意软件嵌入到神经网络中

Income in the first month of naked resignation

Network metering - transport layer

Correction binoculaire

Command line is too long

Replace convolution with full connection layer -- repmlp

【Mixup】《Mixup:Beyond Empirical Risk Minimization》

【Cutout】《Improved Regularization of Convolutional Neural Networks with Cutout》

Pointnet understanding (step 4 of pointnet Implementation)
随机推荐
How do vision transformer work? [interpretation of the paper]
I'll show you why you don't need to log in every time you use Taobao, jd.com, etc?
Target detection for long tail distribution -- balanced group softmax
【Random Erasing】《Random Erasing Data Augmentation》
jetson nano安装tensorflow踩坑记录(scipy1.4.1)
Daily practice (19): print binary tree from top to bottom
AR系统总结收获
【Programming】
【C#笔记】winform中保存DataGridView中的数据为Excel和CSV
C # connect to MySQL database
[learning notes] numerical differentiation of back error propagation
【Random Erasing】《Random Erasing Data Augmentation》
【Batch】learning notes
学习写文章格式
In the era of short video, how to ensure that works are more popular?
【BiSeNet】《BiSeNet:Bilateral Segmentation Network for Real-time Semantic Segmentation》
用于类别增量学习的动态可扩展表征 -- DER
【MnasNet】《MnasNet:Platform-Aware Neural Architecture Search for Mobile》
The hystrix dashboard reported an error hystrix Stream is not in the allowed list of proxy host names solution
【Mixed Pooling】《Mixed Pooling for Convolutional Neural Networks》