当前位置:网站首页>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 !!!!!!!
边栏推荐
- 用全连接层替代掉卷积 -- RepMLP
- 【Mixup】《Mixup:Beyond Empirical Risk Minimization》
- 【Sparse-to-Dense】《Sparse-to-Dense:Depth Prediction from Sparse Depth Samples and a Single Image》
- EKLAVYA -- 利用神经网络推断二进制文件中函数的参数
- Open3d learning note 5 [rgbd fusion]
- 简易打包工具的安装与使用
- 【Batch】learning notes
- On the confrontation samples and their generation methods in deep learning
- 包图画法注意规范
- Network metering - transport layer
猜你喜欢

What if the notebook computer cannot run the CMD command

Where do you find the materials for those articles that have read 10000?
![[learning notes] matlab self compiled image convolution function](/img/82/43fc8b2546867d89fe2d67881285e9.png)
[learning notes] matlab self compiled image convolution function

针对tqdm和print的顺序问题

利用超球嵌入来增强对抗训练

【Mixed Pooling】《Mixed Pooling for Convolutional Neural Networks》

【学习笔记】Matlab自编高斯平滑器+Sobel算子求导

【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》

Dynamic extensible representation for category incremental learning -- der

TimeCLR: A self-supervised contrastive learning framework for univariate time series representation
随机推荐
SQLyog远程连接centos7系统下的MySQL数据库
Mmdetection trains its own data set -- export coco format of cvat annotation file and related operations
【BiSeNet】《BiSeNet:Bilateral Segmentation Network for Real-time Semantic Segmentation》
Rhel7 operation level introduction and switching operation
open3d环境错误汇总
Look for we media materials from four aspects to ensure your creative inspiration
What if the notebook computer cannot run the CMD command
TimeCLR: A self-supervised contrastive learning framework for univariate time series representation
用全连接层替代掉卷积 -- RepMLP
open3d学习笔记四【表面重建】
【DIoU】《Distance-IoU Loss:Faster and Better Learning for Bounding Box Regression》
浅谈深度学习中的对抗样本及其生成方法
【学习笔记】Matlab自编高斯平滑器+Sobel算子求导
笔记本电脑卡顿问题原因
Correction binoculaire
It's great to save 10000 pictures of girls
【FastDepth】《FastDepth:Fast Monocular Depth Estimation on Embedded Systems》
Go functions make, slice, append
How gensim freezes some word vectors for incremental training
【Cutout】《Improved Regularization of Convolutional Neural Networks with Cutout》