当前位置:网站首页>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 !!!!!!!
边栏推荐
- 用MLP代替掉Self-Attention
- Summary of open3d environment errors
- MySQL优化
- Open3d learning note 4 [surface reconstruction]
- 【Random Erasing】《Random Erasing Data Augmentation》
- Mmdetection trains its own data set -- export coco format of cvat annotation file and related operations
- Replace convolution with full connection layer -- repmlp
- 我的vim配置文件
- Business architecture diagram
- 服务器的内网可以访问,外网却不能访问的问题
猜你喜欢
![[binocular vision] binocular stereo matching](/img/93/2e916038f0e7d0c7b3bf64f8dc1b4e.png)
[binocular vision] binocular stereo matching

Hystrix dashboard cannot find hystrix Stream solution

Graph Pooling 简析

Replace convolution with full connection layer -- repmlp

Memory model of program

Jetson nano installation tensorflow stepping pit record (scipy1.4.1)

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

用全连接层替代掉卷积 -- RepMLP

【双目视觉】双目立体匹配

Dynamic extensible representation for category incremental learning -- der
随机推荐
CPU register
Graph Pooling 简析
What if the notebook computer cannot run the CMD command
How gensim freezes some word vectors for incremental training
【Programming】
用全连接层替代掉卷积 -- RepMLP
Vscode下中文乱码问题
利用超球嵌入来增强对抗训练
It's great to save 10000 pictures of girls
C语言的库函数
[learning notes] matlab self compiled image convolution function
E-R画图明确内容
Open3d learning notes II [file reading and writing]
MySQL优化
Organigramme des activités
【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》
最长等比子序列
【MobileNet V3】《Searching for MobileNetV3》
将恶意软件嵌入到神经网络中
用MLP代替掉Self-Attention