当前位置:网站首页>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学习笔记一【初窥门径,文件读取】
- 【双目视觉】双目矫正
- Semi supervised mixpatch
- 用于类别增量学习的动态可扩展表征 -- DER
- install.img制作方式
- 【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》
- Mmdetection trains its own data set -- export coco format of cvat annotation file and related operations
- 针对tqdm和print的顺序问题
- What if the laptop task manager is gray and unavailable
- 【MagNet】《Progressive Semantic Segmentation》
猜你喜欢
![How do vision transformer work? [interpretation of the paper]](/img/93/5f967b876fbd63c07b8cfe8dd17263.png)
How do vision transformer work? [interpretation of the paper]

What if the laptop task manager is gray and unavailable

What if the laptop can't search the wireless network signal

How to turn on night mode on laptop

【Batch】learning notes

open3d学习笔记四【表面重建】

MoCO ——Momentum Contrast for Unsupervised Visual Representation Learning
![[learning notes] numerical differentiation of back error propagation](/img/1c/e28e31d7cc5ccc38607c7839ccc5f0.png)
[learning notes] numerical differentiation of back error propagation

MySQL优化

Replace self attention with MLP
随机推荐
解决jetson nano安装onnx错误(ERROR: Failed building wheel for onnx)总结
Replace convolution with full connection layer -- repmlp
【TCDCN】《Facial landmark detection by deep multi-task learning》
Dynamic extensible representation for category incremental learning -- der
C语言的库函数
In the era of short video, how to ensure that works are more popular?
w10升级至W11系统,黑屏但鼠标与桌面快捷方式能用,如何解决
【Cascade FPD】《Deep Convolutional Network Cascade for Facial Point Detection》
【TCDCN】《Facial landmark detection by deep multi-task learning》
Brief introduction of prompt paradigm
Daily practice (19): print binary tree from top to bottom
Handwritten call, apply, bind
【Batch】learning notes
How do vision transformer work? [interpretation of the paper]
【Batch】learning notes
【学习笔记】Matlab自编高斯平滑器+Sobel算子求导
【双目视觉】双目立体匹配
简易打包工具的安装与使用
Several methods of image enhancement and matlab code
I'll show you why you don't need to log in every time you use Taobao, jd.com, etc?