当前位置:网站首页>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学习笔记三【采样与体素化】
- Open3d learning note 5 [rgbd fusion]
- 【MnasNet】《MnasNet:Platform-Aware Neural Architecture Search for Mobile》
- Pointnet understanding (step 4 of pointnet Implementation)
- Organigramme des activités
- 【学习笔记】Matlab自编高斯平滑器+Sobel算子求导
- Specification for package drawing
- 业务架构图
- 应对长尾分布的目标检测 -- Balanced Group Softmax
- Mmdetection model fine tuning
猜你喜欢
静态库和动态库
【Paper Reading】
使用C#语言来进行json串的接收
【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》
【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》
Feature Engineering: summary of common feature transformation methods
open3d学习笔记三【采样与体素化】
Real world anti sample attack against semantic segmentation
用MLP代替掉Self-Attention
浅谈深度学习模型中的后门
随机推荐
笔记本电脑卡顿问题原因
Income in the first month of naked resignation
EKLAVYA -- 利用神经网络推断二进制文件中函数的参数
open3d学习笔记三【采样与体素化】
【MagNet】《Progressive Semantic Segmentation》
Programmers can only be 35? The 74 year old programmer in the United States has been programming for 57 years and has not retired
MySQL优化
SQL server如何卸载干净
Pointnet understanding (step 4 of pointnet Implementation)
Latex formula normal and italic
open3d学习笔记二【文件读写】
Organigramme des activités
【Hide-and-Seek】《Hide-and-Seek: A Data Augmentation Technique for Weakly-Supervised Localization xxx》
Thesis tips
Meta learning Brief
【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》
Open3d learning note 4 [surface reconstruction]
【C#笔记】winform中保存DataGridView中的数据为Excel和CSV
C语言实现XML生成解析库(XML扩展)
Business architecture diagram