1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QTextStream Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTextStream Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QTextStream class provides a convenient interface for reading and writing text. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qtextstream.html#FieldAlignment-enum">FieldAlignment</a></b> { AlignLeft, AlignRight, AlignCenter, AlignAccountingStyle }</li><li><div class="fn" />enum <b><a href="qtextstream.html#NumberFlag-enum">NumberFlag</a></b> { ShowBase, ForcePoint, ForceSign, UppercaseBase, UppercaseDigits }</li><li><div class="fn" />class <b><a href="qtextstream-numberflags.html">NumberFlags</a></b></li><li><div class="fn" />enum <b><a href="qtextstream.html#RealNumberNotation-enum">RealNumberNotation</a></b> { SmartNotation, FixedNotation, ScientificNotation }</li><li><div class="fn" />enum <b><a href="qtextstream.html#Status-enum">Status</a></b> { Ok, ReadPastEnd, ReadCorruptData }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextstream.html#QTextStream">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#QTextStream-2">__init__</a></b> (<i>self</i>, QIODevice <i>device</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#QTextStream-3">__init__</a></b> (<i>self</i>, QString <i>string</i>, QIODevice.OpenMode <i>openMode</i> = QIODevice.ReadWrite)</li><li><div class="fn" /><b><a href="qtextstream.html#QTextStream-4">__init__</a></b> (<i>self</i>, QByteArray <i>array</i>, QIODevice.OpenMode <i>openMode</i> = QIODevice.ReadWrite)</li><li><div class="fn" />bool <b><a href="qtextstream.html#atEnd">atEnd</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextstream.html#autoDetectUnicode">autoDetectUnicode</a></b> (<i>self</i>)</li><li><div class="fn" />QTextCodec <b><a href="qtextstream.html#codec">codec</a></b> (<i>self</i>)</li><li><div class="fn" />QIODevice <b><a href="qtextstream.html#device">device</a></b> (<i>self</i>)</li><li><div class="fn" />FieldAlignment <b><a href="qtextstream.html#fieldAlignment">fieldAlignment</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextstream.html#fieldWidth">fieldWidth</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#flush">flush</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextstream.html#generateByteOrderMark">generateByteOrderMark</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextstream.html#integerBase">integerBase</a></b> (<i>self</i>)</li><li><div class="fn" />NumberFlags <b><a href="qtextstream.html#numberFlags">numberFlags</a></b> (<i>self</i>)</li><li><div class="fn" />QChar <b><a href="qtextstream.html#padChar">padChar</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtextstream.html#read">read</a></b> (<i>self</i>, long <i>maxlen</i>)</li><li><div class="fn" />QString <b><a href="qtextstream.html#readAll">readAll</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtextstream.html#readLine">readLine</a></b> (<i>self</i>, long <i>maxlen</i> = 0)</li><li><div class="fn" />RealNumberNotation <b><a href="qtextstream.html#realNumberNotation">realNumberNotation</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextstream.html#realNumberPrecision">realNumberPrecision</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#reset">reset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#resetStatus">resetStatus</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextstream.html#seek">seek</a></b> (<i>self</i>, long <i>pos</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setAutoDetectUnicode">setAutoDetectUnicode</a></b> (<i>self</i>, bool <i>enabled</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setCodec">setCodec</a></b> (<i>self</i>, QTextCodec <i>codec</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setCodec-2">setCodec</a></b> (<i>self</i>, str <i>codecName</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setDevice">setDevice</a></b> (<i>self</i>, QIODevice <i>device</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setFieldAlignment">setFieldAlignment</a></b> (<i>self</i>, FieldAlignment <i>alignment</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setFieldWidth">setFieldWidth</a></b> (<i>self</i>, int <i>width</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setGenerateByteOrderMark">setGenerateByteOrderMark</a></b> (<i>self</i>, bool <i>generate</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setIntegerBase">setIntegerBase</a></b> (<i>self</i>, int <i>base</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setNumberFlags">setNumberFlags</a></b> (<i>self</i>, NumberFlags <i>flags</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setPadChar">setPadChar</a></b> (<i>self</i>, QChar <i>ch</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setRealNumberNotation">setRealNumberNotation</a></b> (<i>self</i>, RealNumberNotation <i>notation</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setRealNumberPrecision">setRealNumberPrecision</a></b> (<i>self</i>, int <i>precision</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setStatus">setStatus</a></b> (<i>self</i>, Status <i>status</i>)</li><li><div class="fn" /><b><a href="qtextstream.html#setString">setString</a></b> (<i>self</i>, QString <i>string</i>, QIODevice.OpenMode <i>openMode</i> = QIODevice.ReadWrite)</li><li><div class="fn" /><b><a href="qtextstream.html#skipWhiteSpace">skipWhiteSpace</a></b> (<i>self</i>)</li><li><div class="fn" />Status <b><a href="qtextstream.html#status">status</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtextstream.html#string">string</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />QTextStream <b><a href="qtxml.html#__lshift__">__lshift__</a></b> (<i>self</i>, QDomNode)</li><li><div class="fn" />QTextStream <b><a href="qtgui.html#__lshift__-16">__lshift__</a></b> (<i>self</i>, QSplitter)</li><li><div class="fn" />QTextStream <b><a href="qtgui.html#__rshift__-16">__rshift__</a></b> (<i>self</i>, QSplitter)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__lshift__">__lshift__</a></b> (<i>self</i>, QTextStreamManipulator <i>m</i>)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__lshift__-2">__lshift__</a></b> (<i>self</i>, QChar <i>ch</i>)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__lshift__-3">__lshift__</a></b> (<i>self</i>, QString <i>s</i>)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__lshift__-4">__lshift__</a></b> (<i>self</i>, QByteArray <i>array</i>)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__lshift__-5">__lshift__</a></b> (<i>self</i>, bool <i>b</i>)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__rshift__">__rshift__</a></b> (<i>self</i>, QChar <i>ch</i>)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__rshift__-2">__rshift__</a></b> (<i>self</i>, QString <i>s</i>)</li><li><div class="fn" />QTextStream <b><a href="qtextstream.html#__rshift__-3">__rshift__</a></b> (<i>self</i>, QByteArray <i>array</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextStream class provides a convenient interface for reading and writing text.</p>
<p>QTextStream can operate on a <a href="qiodevice.html">QIODevice</a>, a <a href="qbytearray.html">QByteArray</a> or a <a href="qstring.html">QString</a>. Using QTextStream's streaming operators, you can conveniently read and write words, lines and numbers. For generating text, QTextStream supports formatting options for field padding and alignment, and formatting of numbers. Example:</p>
<pre>
QFile data("output.txt");
if (data.open(QFile.WriteOnly | QFile.Truncate)) {
QTextStream out(&data);
out << "Result: " << qSetFieldWidth(10) << left << 3.14 << 2.7 << endl;
// writes "Result: 3.14 2.7 \n"
}
</pre>
<p>Besides using QTextStream's constructors, you can also set the device or string QTextStream operates on by calling <a href="qtextstream.html#setDevice">setDevice</a>() or <a href="qtextstream.html#setString">setString</a>(). You can seek to a position by calling <a href="qtextstream.html#seek">seek</a>(), and <a href="qtextstream.html#atEnd">atEnd</a>() will return true when there is no data left to be read. If you call <a href="qtcore.html#flush">flush</a>(), QTextStream will empty all data from its write buffer into the device and call <a href="qtcore.html#flush">flush</a>() on the device.</p>
<p>Internally, QTextStream uses a Unicode based buffer, and <a href="qtextcodec.html">QTextCodec</a> is used by QTextStream to automatically support different character sets. By default, <a href="qtextcodec.html#codecForLocale">QTextCodec.codecForLocale</a>() is used for reading and writing, but you can also set the codec by calling <a href="qtextstream.html#setCodec">setCodec</a>(). Automatic Unicode detection is also supported. When this feature is enabled (the default behavior), QTextStream will detect the UTF-16 BOM (Byte Order Mark) and switch to the appropriate UTF-16 codec when reading. QTextStream does not write a BOM by default, but you can enable this by calling setGenerateByteOrderMark(true). When QTextStream operates on a <a href="qstring.html">QString</a> directly, the codec is disabled.</p>
<p>There are three general ways to use QTextStream when reading text files:</p>
<ul>
<li>Chunk by chunk, by calling <a href="qtextstream.html#readLine">readLine</a>() or <a href="qtextstream.html#readAll">readAll</a>().</li>
<li>Word by word. QTextStream supports streaming into QStrings, QByteArrays and char* buffers. Words are delimited by space, and leading white space is automatically skipped.</li>
<li>Character by character, by streaming into <a href="qchar.html">QChar</a> or char types. This method is often used for convenient input handling when parsing files, independent of character encoding and end-of-line semantics. To skip white space, call <a href="qtextstream.html#skipWhiteSpace">skipWhiteSpace</a>().</li>
</ul>
<p>By default, when reading numbers from a stream of text, QTextStream will automatically detect the number's base representation. For example, if the number starts with "0x", it is assumed to be in hexadecimal form. If it starts with the digits 1-9, it is assumed to be in decimal form, and so on. You can set the integer base, thereby disabling the automatic detection, by calling <a href="qtextstream.html#setIntegerBase">setIntegerBase</a>(). Example:</p>
<pre>
QTextStream in("0x50 0x20");
int firstNumber, secondNumber;
in >> firstNumber; // firstNumber == 80
in >> dec >> secondNumber; // secondNumber == 0
char ch;
in >> ch; // ch == 'x'
</pre>
<p>QTextStream supports many formatting options for generating text. You can set the field width and pad character by calling <a href="qtextstream.html#setFieldWidth">setFieldWidth</a>() and <a href="qtextstream.html#setPadChar">setPadChar</a>(). Use <a href="qtextstream.html#setFieldAlignment">setFieldAlignment</a>() to set the alignment within each field. For real numbers, call <a href="qtextstream.html#setRealNumberNotation">setRealNumberNotation</a>() and <a href="qtextstream.html#setRealNumberPrecision">setRealNumberPrecision</a>() to set the notation (<a href="qtextstream.html#RealNumberNotation-enum">SmartNotation</a>, <a href="qtextstream.html#RealNumberNotation-enum">ScientificNotation</a>, <a href="qtextstream.html#RealNumberNotation-enum">FixedNotation</a>) and precision in digits of the generated number. Some extra number formatting options are also available through <a href="qtextstream.html#setNumberFlags">setNumberFlags</a>().</p>
<a id="qtextstream-manipulators" name="qtextstream-manipulators" />
<p>Like <tt><iostream></tt> in the standard C++ library, QTextStream also defines several global manipulator functions:</p>
<table align="center" border="0" cellpadding="2" cellspacing="1">
<tr bgcolor="#A2C511" valign="top">
<th>Manipulator</th>
<th>Description</th>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>bin</tt></td>
<td>Same as setIntegerBase(2).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>oct</tt></td>
<td>Same as setIntegerBase(8).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>dec</tt></td>
<td>Same as setIntegerBase(10).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>hex</tt></td>
<td>Same as setIntegerBase(16).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>showbase</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">ShowBase</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>forcesign</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">ForceSign</a>).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>forcepoint</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">ForcePoint</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>noshowbase</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() & ~<a href="qtextstream.html#NumberFlag-enum">ShowBase</a>).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>noforcesign</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() & ~<a href="qtextstream.html#NumberFlag-enum">ForceSign</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>noforcepoint</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() & ~<a href="qtextstream.html#NumberFlag-enum">ForcePoint</a>).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>uppercasebase</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">UppercaseBase</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>uppercasedigits</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">UppercaseDigits</a>).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>lowercasebase</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() & ~<a href="qtextstream.html#NumberFlag-enum">UppercaseBase</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>lowercasedigits</tt></td>
<td>Same as setNumberFlags(<a href="qtextstream.html#numberFlags">numberFlags</a>() & ~<a href="qtextstream.html#NumberFlag-enum">UppercaseDigits</a>).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>fixed</tt></td>
<td>Same as setRealNumberNotation(<a href="qtextstream.html#RealNumberNotation-enum">FixedNotation</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>scientific</tt></td>
<td>Same as setRealNumberNotation(<a href="qtextstream.html#RealNumberNotation-enum">ScientificNotation</a>).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>left</tt></td>
<td>Same as setFieldAlignment(<a href="qtextstream.html#FieldAlignment-enum">AlignLeft</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>right</tt></td>
<td>Same as setFieldAlignment(<a href="qtextstream.html#FieldAlignment-enum">AlignRight</a>).</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>center</tt></td>
<td>Same as setFieldAlignment(<a href="qtextstream.html#FieldAlignment-enum">AlignCenter</a>).</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>endl</tt></td>
<td>Same as operator<<('\n') and <a href="qtcore.html#flush">flush</a>().</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>flush</tt></td>
<td>Same as <a href="qtcore.html#flush">flush</a>().</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>reset</tt></td>
<td>Same as <a href="qtcore.html#reset">reset</a>().</td>
</tr>
<tr bgcolor="#F0F0F0" valign="top">
<td><tt>ws</tt></td>
<td>Same as <a href="qtextstream.html#skipWhiteSpace">skipWhiteSpace</a>().</td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td><tt>bom</tt></td>
<td>Same as setGenerateByteOrderMark(true).</td>
</tr>
</table>
<br />
<br />
<p>In addition, Qt provides three global manipulators that take a parameter: <a href="qtcore.html#qSetFieldWidth">qSetFieldWidth</a>(), <a href="qtcore.html#qSetPadChar">qSetPadChar</a>(), and <a href="qtcore.html#qSetRealNumberPrecision">qSetRealNumberPrecision</a>().</p>
<p>See also <a href="qdatastream.html">QDataStream</a>, <a href="qiodevice.html">QIODevice</a>, <a href="qfile.html">QFile</a>, <a href="qbuffer.html">QBuffer</a>, and <a href="qtcpsocket.html">QTcpSocket</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="FieldAlignment-enum" />QTextStream.FieldAlignment</h3><p>This enum specifies how to align text in fields when the field is wider than the text that occupies it.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QTextStream.AlignLeft</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Pad on the right side of fields.</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.AlignRight</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Pad on the left side of fields.</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.AlignCenter</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Pad on both sides of field.</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.AlignAccountingStyle</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">Same as AlignRight, except that the sign of a number is flush left.</td>
</tr>
</table>
<br />
<br />
<p>See also <a href="qtextstream.html#setFieldAlignment">setFieldAlignment</a>().</p>
<h3 class="fn"><a name="NumberFlag-enum" />QTextStream.NumberFlag</h3><p>This enum specifies various flags that can be set to affect the output of integers, <tt>float</tt>s, and <tt>double</tt>s.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QTextStream.ShowBase</tt></td>
<td align="center" valign="top"><tt>0x1</tt></td>
<td valign="top">Show the base as a prefix if the base is 16 ("0x"), 8 ("0"), or 2 ("0b").</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.ForcePoint</tt></td>
<td align="center" valign="top"><tt>0x2</tt></td>
<td valign="top">Always put the decimal separator in numbers, even if there are no decimals.</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.ForceSign</tt></td>
<td align="center" valign="top"><tt>0x4</tt></td>
<td valign="top">Always put the sign in numbers, even for positive numbers.</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.UppercaseBase</tt></td>
<td align="center" valign="top"><tt>0x8</tt></td>
<td valign="top">Use uppercase versions of base prefixes ("0X", "0B").</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.UppercaseDigits</tt></td>
<td align="center" valign="top"><tt>0x10</tt></td>
<td valign="top">Use uppercare letters for expressing digits 10 to 35 instead of lowercase.</td>
</tr>
</table>
<br />
<br />
<p>The NumberFlags type is a typedef for <a href="qflags.html">QFlags</a><NumberFlag>. It stores an OR combination of NumberFlag values.</p>
<p>See also <a href="qtextstream.html#setNumberFlags">setNumberFlags</a>().</p>
<h3 class="fn"><a name="RealNumberNotation-enum" />QTextStream.RealNumberNotation</h3><p>This enum specifies which notations to use for expressing <tt>float</tt> and <tt>double</tt> as strings.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QTextStream.ScientificNotation</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Scientific notation (<tt>printf()</tt>'s <tt>%e</tt> flag).</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.FixedNotation</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Fixed-point notation (<tt>printf()</tt>'s <tt>%f</tt> flag).</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.SmartNotation</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Scientific or fixed-point notation, depending on which makes most sense (<tt>printf()</tt>'s <tt>%g</tt> flag).</td>
</tr>
</table>
<br />
<br />
<p>See also <a href="qtextstream.html#setRealNumberNotation">setRealNumberNotation</a>().</p>
<h3 class="fn"><a name="Status-enum" />QTextStream.Status</h3><p>This enum describes the current status of the text stream.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QTextStream.Ok</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">The text stream is operating normally.</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.ReadPastEnd</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">The text stream has read past the end of the data in the underlying device.</td>
</tr>
<tr>
<td valign="top"><tt>QTextStream.ReadCorruptData</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">The text stream has read corrupt data.</td>
</tr>
</table>
<br />
<br />
<p>See also <a href="qtextstream.html#status">status</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextStream" />QTextStream.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qtextstream.html">QTextStream</a>. Before you can use it for reading or writing, you must assign a device or a string.</p>
<p>See also <a href="qtextstream.html#setDevice">setDevice</a>() and <a href="qtextstream.html#setString">setString</a>().</p>
<h3 class="fn"><a name="QTextStream-2" />QTextStream.__init__ (<i>self</i>, <a href="qiodevice.html">QIODevice</a> <i>device</i>)</h3><p>Constructs a <a href="qtextstream.html">QTextStream</a> that operates on <i>device</i>.</p>
<h3 class="fn"><a name="QTextStream-3" />QTextStream.__init__ (<i>self</i>, <a href="qstring.html">QString</a> <i>string</i>, <a href="qiodevice-openmode.html">QIODevice.OpenMode</a> <i>openMode</i> = QIODevice.ReadWrite)</h3><p>Constructs a <a href="qtextstream.html">QTextStream</a> that operates on <i>fileHandle</i>, using <i>openMode</i> to define the open mode. Internally, a <a href="qfile.html">QFile</a> is created to handle the FILE pointer.</p>
<p>This constructor is useful for working directly with the common FILE based input and output streams: stdin, stdout and stderr. Example:</p>
<pre>
QString str;
QTextStream in(stdin);
in >> str;
</pre>
<h3 class="fn"><a name="QTextStream-4" />QTextStream.__init__ (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>array</i>, <a href="qiodevice-openmode.html">QIODevice.OpenMode</a> <i>openMode</i> = QIODevice.ReadWrite)</h3><p>Constructs a <a href="qtextstream.html">QTextStream</a> that operates on <i>string</i>, using <i>openMode</i> to define the open mode.</p>
<h3 class="fn"><a name="atEnd" />bool QTextStream.atEnd (<i>self</i>)</h3><p>Returns true if there is no more data to be read from the <a href="qtextstream.html">QTextStream</a>; otherwise returns false. This is similar to, but not the same as calling <a href="qiodevice.html#atEnd">QIODevice.atEnd</a>(), as <a href="qtextstream.html">QTextStream</a> also takes into account its internal Unicode buffer.</p>
<h3 class="fn"><a name="autoDetectUnicode" />bool QTextStream.autoDetectUnicode (<i>self</i>)</h3><p>Returns true if automatic Unicode detection is enabled; otherwise returns false.</p>
<p>See also <a href="qtextstream.html#setAutoDetectUnicode">setAutoDetectUnicode</a>() and <a href="qtextstream.html#setCodec">setCodec</a>().</p>
<h3 class="fn"><a name="codec" /><a href="qtextcodec.html">QTextCodec</a> QTextStream.codec (<i>self</i>)</h3><p>Returns the codec that is current assigned to the stream.</p>
<p>See also <a href="qtextstream.html#setCodec">setCodec</a>() and <a href="qtextstream.html#setAutoDetectUnicode">setAutoDetectUnicode</a>().</p>
<h3 class="fn"><a name="device" /><a href="qiodevice.html">QIODevice</a> QTextStream.device (<i>self</i>)</h3><p>Returns the current device associated with the <a href="qtextstream.html">QTextStream</a>, or 0 if no device has been assigned.</p>
<p>See also <a href="qtextstream.html#setDevice">setDevice</a>() and <a href="qtextstream.html#string">string</a>().</p>
<h3 class="fn"><a name="fieldAlignment" /><a href="qtextstream.html#FieldAlignment-enum">FieldAlignment</a> QTextStream.fieldAlignment (<i>self</i>)</h3><p>Returns the current field alignment.</p>
<p>See also <a href="qtextstream.html#setFieldAlignment">setFieldAlignment</a>() and <a href="qtextstream.html#fieldWidth">fieldWidth</a>().</p>
<h3 class="fn"><a name="fieldWidth" />int QTextStream.fieldWidth (<i>self</i>)</h3><p>Returns the current field width.</p>
<p>See also <a href="qtextstream.html#setFieldWidth">setFieldWidth</a>().</p>
<h3 class="fn"><a name="flush" />QTextStream.flush (<i>self</i>)</h3><p>Flushes any buffered data waiting to be written to the device.</p>
<p>If <a href="qtextstream.html">QTextStream</a> operates on a string, this function does nothing.</p>
<h3 class="fn"><a name="generateByteOrderMark" />bool QTextStream.generateByteOrderMark (<i>self</i>)</h3><p>Returns true if <a href="qtextstream.html">QTextStream</a> is set to generate the UTF-16 BOM (Byte Order Mark) when using a UTF-16 codec; otherwise returns false.</p>
<p>See also <a href="qtextstream.html#setGenerateByteOrderMark">setGenerateByteOrderMark</a>().</p>
<h3 class="fn"><a name="integerBase" />int QTextStream.integerBase (<i>self</i>)</h3><p>Returns the current base of integers. 0 means that the base is detected when reading, or 10 (decimal) when generating numbers.</p>
<p>See also <a href="qtextstream.html#setIntegerBase">setIntegerBase</a>(), <a href="qstring.html#number">QString.number</a>(), and <a href="qtextstream.html#numberFlags">numberFlags</a>().</p>
<h3 class="fn"><a name="numberFlags" /><a href="qtextstream-numberflags.html">NumberFlags</a> QTextStream.numberFlags (<i>self</i>)</h3><p>Returns the current number flags.</p>
<p>See also <a href="qtextstream.html#setNumberFlags">setNumberFlags</a>(), <a href="qtextstream.html#integerBase">integerBase</a>(), and <a href="qtextstream.html#realNumberNotation">realNumberNotation</a>().</p>
<h3 class="fn"><a name="padChar" /><a href="qchar.html">QChar</a> QTextStream.padChar (<i>self</i>)</h3><p>Returns the current pad character.</p>
<p>See also <a href="qtextstream.html#setPadChar">setPadChar</a>() and <a href="qtextstream.html#setFieldWidth">setFieldWidth</a>().</p>
<h3 class="fn"><a name="read" /><a href="qstring.html">QString</a> QTextStream.read (<i>self</i>, long <i>maxlen</i>)</h3><p>Reads at most <i>maxlen</i> characters from the stream, and returns the data read as a <a href="qstring.html">QString</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtextstream.html#readAll">readAll</a>(), <a href="qtextstream.html#readLine">readLine</a>(), and <a href="qiodevice.html#read">QIODevice.read</a>().</p>
<h3 class="fn"><a name="readAll" /><a href="qstring.html">QString</a> QTextStream.readAll (<i>self</i>)</h3><p>Reads the entire content of the stream, and returns it as a <a href="qstring.html">QString</a>. Avoid this function when working on large files, as it will consume a significant amount of memory.</p>
<p>Calling <a href="qtextstream.html#readLine">readLine</a>() is better if you do not know how much data is available.</p>
<p>See also <a href="qtextstream.html#readLine">readLine</a>().</p>
<h3 class="fn"><a name="readLine" /><a href="qstring.html">QString</a> QTextStream.readLine (<i>self</i>, long <i>maxlen</i> = 0)</h3><p>Reads one line of text from the stream, and returns it as a <a href="qstring.html">QString</a>. The maximum allowed line length is set to <i>maxlen</i>. If the stream contains lines longer than this, then the lines will be split after <i>maxlen</i> characters and returned in parts.</p>
<p>If <i>maxlen</i> is 0, the lines can be of any length. A common value for <i>maxlen</i> is 75.</p>
<p>The returned line has no trailing end-of-line characters, so calling <a href="qstring.html#trimmed">QString.trimmed</a>() is unnecessary.</p>
<p>If the stream has read to the end of the file, the returned string will be a null string - see <a href="qstring.html#isNull">QString.isNull</a>(). Empty lines are represented by empty, but non-null strings - see <a href="qstring.html#isEmpty">QString.isEmpty</a>().</p>
<p>You can also explicitly test for the end of the file using <a href="qtextstream.html#atEnd">atEnd</a>().</p>
<p>See also <a href="qtextstream.html#readAll">readAll</a>().</p>
<h3 class="fn"><a name="realNumberNotation" /><a href="qtextstream.html#RealNumberNotation-enum">RealNumberNotation</a> QTextStream.realNumberNotation (<i>self</i>)</h3><p>Returns the current real number notation.</p>
<p>See also <a href="qtextstream.html#setRealNumberNotation">setRealNumberNotation</a>(), <a href="qtextstream.html#realNumberPrecision">realNumberPrecision</a>(), <a href="qtextstream.html#numberFlags">numberFlags</a>(), and <a href="qtextstream.html#integerBase">integerBase</a>().</p>
<h3 class="fn"><a name="realNumberPrecision" />int QTextStream.realNumberPrecision (<i>self</i>)</h3><p>Returns the current real number precision, or the number of fraction digits <a href="qtextstream.html">QTextStream</a> will write when generating real numbers.</p>
<p>See also <a href="qtextstream.html#setRealNumberPrecision">setRealNumberPrecision</a>(), <a href="qtextstream.html#setRealNumberNotation">setRealNumberNotation</a>(), <a href="qtextstream.html#realNumberNotation">realNumberNotation</a>(), <a href="qtextstream.html#numberFlags">numberFlags</a>(), and <a href="qtextstream.html#integerBase">integerBase</a>().</p>
<h3 class="fn"><a name="reset" />QTextStream.reset (<i>self</i>)</h3><p>Resets <a href="qtextstream.html">QTextStream</a>'s formatting options, bringing it back to its original constructed state. The device, string and any buffered data is left untouched.</p>
<h3 class="fn"><a name="resetStatus" />QTextStream.resetStatus (<i>self</i>)</h3><p>Resets the status of the text stream.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtextstream.html#Status-enum">QTextStream.Status</a>, <a href="qtextstream.html#status">status</a>(), and <a href="qtextstream.html#setStatus">setStatus</a>().</p>
<h3 class="fn"><a name="seek" />bool QTextStream.seek (<i>self</i>, long <i>pos</i>)</h3><p>Seeks to the position <i>pos</i> in the device. Returns true on success; otherwise returns false.</p>
<p>If <a href="qtextstream.html">QTextStream</a> operates on a string, this function does nothing and returns false.</p>
<h3 class="fn"><a name="setAutoDetectUnicode" />QTextStream.setAutoDetectUnicode (<i>self</i>, bool <i>enabled</i>)</h3><p>If <i>enabled</i> is true, <a href="qtextstream.html">QTextStream</a> will attempt to detect Unicode encoding by peeking into the stream data to see if it can find the UTF-16 BOM (Byte Order Mark). If this mark is found, <a href="qtextstream.html">QTextStream</a> will replace the current codec with the UTF-16 codec.</p>
<p>This function can be used together with <a href="qtextstream.html#setCodec">setCodec</a>(). It is common to set the codec to UTF-8, and then enable UTF-16 detection.</p>
<p>See also <a href="qtextstream.html#autoDetectUnicode">autoDetectUnicode</a>() and <a href="qtextstream.html#setCodec">setCodec</a>().</p>
<h3 class="fn"><a name="setCodec" />QTextStream.setCodec (<i>self</i>, <a href="qtextcodec.html">QTextCodec</a> <i>codec</i>)</h3><p>Sets the codec for this stream to <i>codec</i>. The codec is used for decoding any data that is read from the assigned device, and for encoding any data that is written. By default, <a href="qtextcodec.html#codecForLocale">QTextCodec.codecForLocale</a>() is used, and automatic unicode detection is enabled.</p>
<p>If <a href="qtextstream.html">QTextStream</a> operates on a string, this function does nothing.</p>
<p>See also <a href="qtextstream.html#codec">codec</a>() and <a href="qtextstream.html#setAutoDetectUnicode">setAutoDetectUnicode</a>().</p>
<h3 class="fn"><a name="setCodec-2" />QTextStream.setCodec (<i>self</i>, str <i>codecName</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Sets the codec for this stream to the <a href="qtextcodec.html">QTextCodec</a> for the encoding specified by <i>codecName</i>. Common values for <tt>codecName</tt> include "ISO 8859-1", "UTF-8", and "UTF-16". If the encoding isn't recognized, nothing happens.</p>
<p>Example:</p>
<pre>
QTextStream out(&file);
out.setCodec("UTF-8");
</pre>
<p>See also <a href="qtextcodec.html#codecForName">QTextCodec.codecForName</a>().</p>
<h3 class="fn"><a name="setDevice" />QTextStream.setDevice (<i>self</i>, <a href="qiodevice.html">QIODevice</a> <i>device</i>)</h3><p>Sets the current device to <i>device</i>. If a device has already been assigned, <a href="qtextstream.html">QTextStream</a> will call <a href="qtcore.html#flush">flush</a>() before the old device is replaced.</p>
<p>See also <a href="qtextstream.html#device">device</a>() and <a href="qtextstream.html#setString">setString</a>().</p>
<h3 class="fn"><a name="setFieldAlignment" />QTextStream.setFieldAlignment (<i>self</i>, <a href="qtextstream.html#FieldAlignment-enum">FieldAlignment</a> <i>alignment</i>)</h3><p>Sets the field alignment to <i>mode</i>. When used together with <a href="qtextstream.html#setFieldWidth">setFieldWidth</a>(), this function allows you to generate formatted output with text aligned to the left, to the right or center aligned.</p>
<p>See also <a href="qtextstream.html#fieldAlignment">fieldAlignment</a>() and <a href="qtextstream.html#setFieldWidth">setFieldWidth</a>().</p>
<h3 class="fn"><a name="setFieldWidth" />QTextStream.setFieldWidth (<i>self</i>, int <i>width</i>)</h3><p>Sets the current field width to <i>width</i>. If <i>width</i> is 0 (the default), the field width is equal to the length of the generated text.</p>
<p>See also <a href="qtextstream.html#fieldWidth">fieldWidth</a>() and <a href="qtextstream.html#setPadChar">setPadChar</a>().</p>
<h3 class="fn"><a name="setGenerateByteOrderMark" />QTextStream.setGenerateByteOrderMark (<i>self</i>, bool <i>generate</i>)</h3><p>If <i>generate</i> is true and a UTF-16 codec is used, <a href="qtextstream.html">QTextStream</a> will insert the BOM (Byte Order Mark) before any data has been written to the device. If <i>generate</i> is false, no BOM will be inserted. This function must be called before any data is written. Otherwise, it does nothing.</p>
<p>See also <a href="qtextstream.html#generateByteOrderMark">generateByteOrderMark</a>() and <a href="qtcore.html#bom">bom</a>().</p>
<h3 class="fn"><a name="setIntegerBase" />QTextStream.setIntegerBase (<i>self</i>, int <i>base</i>)</h3><p>Sets the base of integers to <i>base</i>, both for reading and for generating numbers. <i>base</i> can be either 2 (binary), 8 (octal), 10 (decimal) or 16 (hexadecimal). If <i>base</i> is 0, <a href="qtextstream.html">QTextStream</a> will attempt to detect the base by inspecting the data on the stream. When generating numbers, <a href="qtextstream.html">QTextStream</a> assumes base is 10 unless the base has been set explicitly.</p>
<p>See also <a href="qtextstream.html#integerBase">integerBase</a>(), <a href="qstring.html#number">QString.number</a>(), and <a href="qtextstream.html#setNumberFlags">setNumberFlags</a>().</p>
<h3 class="fn"><a name="setNumberFlags" />QTextStream.setNumberFlags (<i>self</i>, <a href="qtextstream-numberflags.html">NumberFlags</a> <i>flags</i>)</h3><p>Sets the current number flags to <i>flags</i>. <i>flags</i> is a set of flags from the <a href="qtextstream.html#NumberFlag-enum">NumberFlags</a> enum, and describes options for formatting generated code (e.g., whether or not to always write the base or sign of a number).</p>
<p>See also <a href="qtextstream.html#numberFlags">numberFlags</a>(), <a href="qtextstream.html#setIntegerBase">setIntegerBase</a>(), and <a href="qtextstream.html#setRealNumberNotation">setRealNumberNotation</a>().</p>
<h3 class="fn"><a name="setPadChar" />QTextStream.setPadChar (<i>self</i>, <a href="qchar.html">QChar</a> <i>ch</i>)</h3><p>Sets the pad character to <i>ch</i>. The default value is the ASCII space character (' '), or <a href="qchar.html">QChar</a>(0x20). This character is used to fill in the space in fields when generating text.</p>
<p>Example:</p>
<pre>
QString s;
QTextStream out(&s);
out.setFieldWidth(10);
out.setPadChar('-');
out << "Qt" << endl << "rocks!" << endl;
</pre>
<p>Output:</p>
<pre>
----Qt----
--rocks!--
</pre>
<p>See also <a href="qtextstream.html#padChar">padChar</a>() and <a href="qtextstream.html#setFieldWidth">setFieldWidth</a>().</p>
<h3 class="fn"><a name="setRealNumberNotation" />QTextStream.setRealNumberNotation (<i>self</i>, <a href="qtextstream.html#RealNumberNotation-enum">RealNumberNotation</a> <i>notation</i>)</h3><p>Sets the real number notation to <i>notation</i> (<a href="qtextstream.html#RealNumberNotation-enum">SmartNotation</a>, <a href="qtextstream.html#RealNumberNotation-enum">FixedNotation</a>, <a href="qtextstream.html#RealNumberNotation-enum">ScientificNotation</a>). When reading and generating numbers, <a href="qtextstream.html">QTextStream</a> uses this value to detect the formatting of real numbers.</p>
<p>See also <a href="qtextstream.html#realNumberNotation">realNumberNotation</a>(), <a href="qtextstream.html#setRealNumberPrecision">setRealNumberPrecision</a>(), <a href="qtextstream.html#setNumberFlags">setNumberFlags</a>(), and <a href="qtextstream.html#setIntegerBase">setIntegerBase</a>().</p>
<h3 class="fn"><a name="setRealNumberPrecision" />QTextStream.setRealNumberPrecision (<i>self</i>, int <i>precision</i>)</h3><p>Sets the precision of real numbers to <i>precision</i>. This value describes the number of fraction digits <a href="qtextstream.html">QTextStream</a> should write when generating real numbers.</p>
<p>See also <a href="qtextstream.html#realNumberPrecision">realNumberPrecision</a>() and <a href="qtextstream.html#setRealNumberNotation">setRealNumberNotation</a>().</p>
<h3 class="fn"><a name="setStatus" />QTextStream.setStatus (<i>self</i>, <a href="qtextstream.html#Status-enum">Status</a> <i>status</i>)</h3><p>Sets the status of the text stream to the <i>status</i> given.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtextstream.html#Status-enum">Status</a>, <a href="qtextstream.html#status">status</a>(), and <a href="qtextstream.html#resetStatus">resetStatus</a>().</p>
<h3 class="fn"><a name="setString" />QTextStream.setString (<i>self</i>, <a href="qstring.html">QString</a> <i>string</i>, <a href="qiodevice-openmode.html">QIODevice.OpenMode</a> <i>openMode</i> = QIODevice.ReadWrite)</h3><p>Sets the current string to <i>string</i>, using the given <i>openMode</i>. If a device has already been assigned, <a href="qtextstream.html">QTextStream</a> will call <a href="qtcore.html#flush">flush</a>() before replacing it.</p>
<p>See also <a href="qtextstream.html#string">string</a>() and <a href="qtextstream.html#setDevice">setDevice</a>().</p>
<h3 class="fn"><a name="skipWhiteSpace" />QTextStream.skipWhiteSpace (<i>self</i>)</h3><p>Reads and discards whitespace from the stream until either a non-space character is detected, or until <a href="qtextstream.html#atEnd">atEnd</a>() returns true. This function is useful when reading a stream character by character.</p>
<p>Whitespace characters are all characters for which <a href="qchar.html#isSpace">QChar.isSpace</a>() returns true.</p>
<p>See also operator>>(QChar &) and operator>>(char &).</p>
<h3 class="fn"><a name="status" /><a href="qtextstream.html#Status-enum">Status</a> QTextStream.status (<i>self</i>)</h3><p>Returns the status of the text stream.</p>
<p>See also <a href="qtextstream.html#Status-enum">QTextStream.Status</a>, <a href="qtextstream.html#setStatus">setStatus</a>(), and <a href="qtextstream.html#resetStatus">resetStatus</a>().</p>
<h3 class="fn"><a name="string" /><a href="qstring.html">QString</a> QTextStream.string (<i>self</i>)</h3><p>Returns the current string assigned to the <a href="qtextstream.html">QTextStream</a>, or 0 if no string has been assigned.</p>
<p>See also <a href="qtextstream.html#setString">setString</a>() and <a href="qtextstream.html#device">device</a>().</p>
<h3 class="fn"><a name="__lshift__" /><a href="qtextstream.html">QTextStream</a> __lshift__ (<i>self</i>, <a href="qdomnode.html">QDomNode</a>)</h3><p>This method is only available if the QtXml module is imported.</p><h3 class="fn"><a name="__lshift__-16" /><a href="qtextstream.html">QTextStream</a> __lshift__ (<i>self</i>, <a href="qsplitter.html">QSplitter</a>)</h3><p>This method is only available if the QtGui module is imported.</p><h3 class="fn"><a name="__rshift__-16" /><a href="qtextstream.html">QTextStream</a> __rshift__ (<i>self</i>, <a href="qsplitter.html">QSplitter</a>)</h3><p>This method is only available if the QtGui module is imported.</p><h3 class="fn"><a name="__lshift__" /><a href="qtextstream.html">QTextStream</a> QTextStream.__lshift__ (<i>self</i>, QTextStreamManipulator <i>m</i>)</h3><h3 class="fn"><a name="__lshift__-2" /><a href="qtextstream.html">QTextStream</a> QTextStream.__lshift__ (<i>self</i>, <a href="qchar.html">QChar</a> <i>ch</i>)</h3><h3 class="fn"><a name="__lshift__-3" /><a href="qtextstream.html">QTextStream</a> QTextStream.__lshift__ (<i>self</i>, <a href="qstring.html">QString</a> <i>s</i>)</h3><h3 class="fn"><a name="__lshift__-4" /><a href="qtextstream.html">QTextStream</a> QTextStream.__lshift__ (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>array</i>)</h3><h3 class="fn"><a name="__lshift__-5" /><a href="qtextstream.html">QTextStream</a> QTextStream.__lshift__ (<i>self</i>, bool <i>b</i>)</h3><h3 class="fn"><a name="__rshift__" /><a href="qtextstream.html">QTextStream</a> QTextStream.__rshift__ (<i>self</i>, <a href="qchar.html">QChar</a> <i>ch</i>)</h3><h3 class="fn"><a name="__rshift__-2" /><a href="qtextstream.html">QTextStream</a> QTextStream.__rshift__ (<i>self</i>, <a href="qstring.html">QString</a> <i>s</i>)</h3><h3 class="fn"><a name="__rshift__-3" /><a href="qtextstream.html">QTextStream</a> QTextStream.__rshift__ (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>array</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|