当我在 qtcreator 中放入多行时,我有很长的 Qstring(html 代码)
我得到一个错误,她是我得到一个错误的代码,那么最好的方法是什么
多行Qstring没有错误
html += "<!doctype html>
<html>
<head>
<style type="text/css">
html, body {
margin: auto;
}
#container {
margin-top: 41px;
margin-left: 61px;
margin-right: 61px;
}
#logo {
text-align: center;
}
#client li,#entreprise li {
text-decoration: none;
list-style: none;
font-size: 16px;
margin-bottom: 6px;
}
#facture_num {
text-align: center;
font-weight: bold;
font-family: arial;
font-size: 21px;
margin-top: 30px;
margin-bottom: 30px;
}
#client {
float: right;
width: 500px;
margin-right: 260px;
margin-bottom: 30px;
margin-top: -12px;
}
table {
width: 1000px;
}
table td {
text-align: center;
}
table th {
background: #ccc;
}
</style>
</head>
<body>
<div id="container">
<!-- Header of facture -->
<div id="logo">
<h1>Logo d'entreprise</h1>
</div>
<ul id="entreprise">
<li>N° RC: 23131313213213132</li>
<li>N° CF : 556465465456456456</li>
<li></li></ul>
<div id="facture_num">Factrue N°:...........</div>
<ul id="client">
<li>Client:</li>
<li>N° rc: 23131313213213132</li>
<li>N° cf : 556465465456456456</li>
<li></li>
</ul>
<br>
<br>
<!-- body of facture -->
<table>
<thead>
<tr>
<th>N°</th>
<th>Désignation</th>
<th>Qte</th>
<th>Prix Unitaire</th>
<th>Montant</th>
</tr>
</thead>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tfoot>
<tr>
<td></td>
</tr>
</tfoot>
</table>
<!-- footer of facture -->
</div>
</body>
</html>";