File: qtcore.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (330 lines) | stat: -rw-r--r-- 58,293 bytes parent folder | download
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
<?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>QtCore Module</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">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QtCore Module<br /></h1><p>The QtCore module contains core non-GUI functionality. <a href="#details">More...</a></p><h3>Types</h3><ul><li><div class="fn" />class <b><a href="qabstractanimation.html">QAbstractAnimation</a></b></li><li><div class="fn" />class <b><a href="qabstracteventdispatcher.html">QAbstractEventDispatcher</a></b></li><li><div class="fn" />class <b><a href="qabstractfileengine.html">QAbstractFileEngine</a></b></li><li><div class="fn" />class <b><a href="qabstractfileenginehandler.html">QAbstractFileEngineHandler</a></b></li><li><div class="fn" />class <b><a href="qabstractfileengineiterator.html">QAbstractFileEngineIterator</a></b></li><li><div class="fn" />class <b><a href="qabstractitemmodel.html">QAbstractItemModel</a></b></li><li><div class="fn" />class <b><a href="qabstractlistmodel.html">QAbstractListModel</a></b></li><li><div class="fn" />class <b><a href="qabstractstate.html">QAbstractState</a></b></li><li><div class="fn" />class <b><a href="qabstracttablemodel.html">QAbstractTableModel</a></b></li><li><div class="fn" />class <b><a href="qabstracttransition.html">QAbstractTransition</a></b></li><li><div class="fn" />class <b><a href="qanimationgroup.html">QAnimationGroup</a></b></li><li><div class="fn" />class <b><a href="qbasictimer.html">QBasicTimer</a></b></li><li><div class="fn" />class <b><a href="qbitarray.html">QBitArray</a></b></li><li><div class="fn" />class <b><a href="qbuffer.html">QBuffer</a></b></li><li><div class="fn" />class <b><a href="qbytearray.html">QByteArray</a></b></li><li><div class="fn" />class <b><a href="qbytearraymatcher.html">QByteArrayMatcher</a></b></li><li><div class="fn" />class <b><a href="qchar.html">QChar</a></b></li><li><div class="fn" />class <b><a href="qchildevent.html">QChildEvent</a></b></li><li><div class="fn" />class <b><a href="qcoreapplication.html">QCoreApplication</a></b></li><li><div class="fn" />class <b><a href="qcryptographichash.html">QCryptographicHash</a></b></li><li><div class="fn" />class <b><a href="qdatastream.html">QDataStream</a></b></li><li><div class="fn" />class <b><a href="qdate.html">QDate</a></b></li><li><div class="fn" />class <b><a href="qdatetime.html">QDateTime</a></b></li><li><div class="fn" />class <b><a href="qdir.html">QDir</a></b></li><li><div class="fn" />class <b><a href="qdiriterator.html">QDirIterator</a></b></li><li><div class="fn" />class <b><a href="qdynamicpropertychangeevent.html">QDynamicPropertyChangeEvent</a></b></li><li><div class="fn" />class <b><a href="qeasingcurve.html">QEasingCurve</a></b></li><li><div class="fn" />class <b><a href="qevent.html">QEvent</a></b></li><li><div class="fn" />class <b><a href="qeventloop.html">QEventLoop</a></b></li><li><div class="fn" />class <b><a href="qeventtransition.html">QEventTransition</a></b></li><li><div class="fn" />class <b><a href="qfile.html">QFile</a></b></li><li><div class="fn" />class <b><a href="qfileinfo.html">QFileInfo</a></b></li><li><div class="fn" />class <b><a href="qfilesystemwatcher.html">QFileSystemWatcher</a></b></li><li><div class="fn" />class <b><a href="qfinalstate.html">QFinalState</a></b></li><li><div class="fn" />class <b><a href="qfsfileengine.html">QFSFileEngine</a></b></li><li><div class="fn" />class <b><a href="qgenericargument.html">QGenericArgument</a></b></li><li><div class="fn" />class <b><a href="qgenericreturnargument.html">QGenericReturnArgument</a></b></li><li><div class="fn" />class <b><a href="qhistorystate.html">QHistoryState</a></b></li><li><div class="fn" />class <b><a href="qiodevice.html">QIODevice</a></b></li><li><div class="fn" />class <b><a href="qlatin1char.html">QLatin1Char</a></b></li><li><div class="fn" />class <b><a href="qlatin1string.html">QLatin1String</a></b></li><li><div class="fn" />class <b><a href="qlibrary.html">QLibrary</a></b></li><li><div class="fn" />class <b><a href="qlibraryinfo.html">QLibraryInfo</a></b></li><li><div class="fn" />class <b><a href="qline.html">QLine</a></b></li><li><div class="fn" />class <b><a href="qlinef.html">QLineF</a></b></li><li><div class="fn" />class <b><a href="qlocale.html">QLocale</a></b></li><li><div class="fn" />class <b><a href="qmargins.html">QMargins</a></b></li><li><div class="fn" />class <b><a href="qmetaclassinfo.html">QMetaClassInfo</a></b></li><li><div class="fn" />class <b><a href="qmetaenum.html">QMetaEnum</a></b></li><li><div class="fn" />class <b><a href="qmetamethod.html">QMetaMethod</a></b></li><li><div class="fn" />class <b><a href="qmetaobject.html">QMetaObject</a></b></li><li><div class="fn" />class <b><a href="qmetaproperty.html">QMetaProperty</a></b></li><li><div class="fn" />class <b><a href="qmetatype.html">QMetaType</a></b></li><li><div class="fn" />class <b><a href="qmimedata.html">QMimeData</a></b></li><li><div class="fn" />class <b><a href="qmodelindex.html">QModelIndex</a></b></li><li><div class="fn" />class <b><a href="qmutex.html">QMutex</a></b></li><li><div class="fn" />class <b><a href="qmutexlocker.html">QMutexLocker</a></b></li><li><div class="fn" />class <b><a href="qobject.html">QObject</a></b></li><li><div class="fn" />class <b><a href="qobjectcleanuphandler.html">QObjectCleanupHandler</a></b></li><li><div class="fn" />class <b><a href="qparallelanimationgroup.html">QParallelAnimationGroup</a></b></li><li><div class="fn" />class <b><a href="qpauseanimation.html">QPauseAnimation</a></b></li><li><div class="fn" />class <b><a href="qpersistentmodelindex.html">QPersistentModelIndex</a></b></li><li><div class="fn" />class <b><a href="qpluginloader.html">QPluginLoader</a></b></li><li><div class="fn" />class <b><a href="qpoint.html">QPoint</a></b></li><li><div class="fn" />class <b><a href="qpointf.html">QPointF</a></b></li><li><div class="fn" />class <b><a href="qprocess.html">QProcess</a></b></li><li><div class="fn" />class <b><a href="qprocessenvironment.html">QProcessEnvironment</a></b></li><li><div class="fn" />class <b><a href="qpropertyanimation.html">QPropertyAnimation</a></b></li><li><div class="fn" />class <b><a href="qreadlocker.html">QReadLocker</a></b></li><li><div class="fn" />class <b><a href="qreadwritelock.html">QReadWriteLock</a></b></li><li><div class="fn" />class <b><a href="qrect.html">QRect</a></b></li><li><div class="fn" />class <b><a href="qrectf.html">QRectF</a></b></li><li><div class="fn" />class <b><a href="qregexp.html">QRegExp</a></b></li><li><div class="fn" />class <b><a href="qresource.html">QResource</a></b></li><li><div class="fn" />class <b><a href="qrunnable.html">QRunnable</a></b></li><li><div class="fn" />class <b><a href="qsemaphore.html">QSemaphore</a></b></li><li><div class="fn" />class <b><a href="qsequentialanimationgroup.html">QSequentialAnimationGroup</a></b></li><li><div class="fn" />class <b><a href="qsettings.html">QSettings</a></b></li><li><div class="fn" />class <b><a href="qsharedmemory.html">QSharedMemory</a></b></li><li><div class="fn" />class <b><a href="qsignalmapper.html">QSignalMapper</a></b></li><li><div class="fn" />class <b><a href="qsignaltransition.html">QSignalTransition</a></b></li><li><div class="fn" />class <b><a href="qsize.html">QSize</a></b></li><li><div class="fn" />class <b><a href="qsizef.html">QSizeF</a></b></li><li><div class="fn" />class <b><a href="qsocketnotifier.html">QSocketNotifier</a></b></li><li><div class="fn" />class <b><a href="qstate.html">QState</a></b></li><li><div class="fn" />class <b><a href="qstatemachine.html">QStateMachine</a></b></li><li><div class="fn" />class <b><a href="qstring.html">QString</a></b></li><li><div class="fn" />class <b><a href="qstringlist.html">QStringList</a></b></li><li><div class="fn" />class <b><a href="qstringmatcher.html">QStringMatcher</a></b></li><li><div class="fn" />class <b><a href="qstringref.html">QStringRef</a></b></li><li><div class="fn" />class <b><a href="qsysinfo.html">QSysInfo</a></b></li><li><div class="fn" />class <b><a href="qsystemlocale.html">QSystemLocale</a></b></li><li><div class="fn" />class <b><a href="qsystemsemaphore.html">QSystemSemaphore</a></b></li><li><div class="fn" />class <b><a href="qt.html">Qt</a></b></li><li><div class="fn" />class <b><a href="qtemporaryfile.html">QTemporaryFile</a></b></li><li><div class="fn" />class <b><a href="qtextboundaryfinder.html">QTextBoundaryFinder</a></b></li><li><div class="fn" />class <b><a href="qtextcodec.html">QTextCodec</a></b></li><li><div class="fn" />class <b><a href="qtextdecoder.html">QTextDecoder</a></b></li><li><div class="fn" />class <b><a href="qtextencoder.html">QTextEncoder</a></b></li><li><div class="fn" />class <b><a href="qtextstream.html">QTextStream</a></b></li><li><div class="fn" />class <b><a href="qthread.html">QThread</a></b></li><li><div class="fn" />class <b><a href="qthreadpool.html">QThreadPool</a></b></li><li><div class="fn" />class <b><a href="qtime.html">QTime</a></b></li><li><div class="fn" />class <b><a href="qtimeline.html">QTimeLine</a></b></li><li><div class="fn" />class <b><a href="qtimer.html">QTimer</a></b></li><li><div class="fn" />class <b><a href="qtimerevent.html">QTimerEvent</a></b></li><li><div class="fn" />enum <b><a href="qtcore.html#QtMsgType-enum">QtMsgType</a></b> { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg }</li><li><div class="fn" />class <b><a href="qtranslator.html">QTranslator</a></b></li><li><div class="fn" />class <b><a href="qurl.html">QUrl</a></b></li><li><div class="fn" />class <b><a href="quuid.html">QUuid</a></b></li><li><div class="fn" />class <b><a href="qvariant.html">QVariant</a></b></li><li><div class="fn" />class <b><a href="qvariantanimation.html">QVariantAnimation</a></b></li><li><div class="fn" />class <b><a href="qwaitcondition.html">QWaitCondition</a></b></li><li><div class="fn" />class <b><a href="qwritelocker.html">QWriteLocker</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamattribute.html">QXmlStreamAttribute</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamattributes.html">QXmlStreamAttributes</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamentitydeclaration.html">QXmlStreamEntityDeclaration</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamentityresolver.html">QXmlStreamEntityResolver</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamnamespacedeclaration.html">QXmlStreamNamespaceDeclaration</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamnotationdeclaration.html">QXmlStreamNotationDeclaration</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamreader.html">QXmlStreamReader</a></b></li><li><div class="fn" />class <b><a href="qxmlstreamwriter.html">QXmlStreamWriter</a></b></li><li><div class="fn" />enum <b><a href="qtcore.html#Type-enum">Type</a></b> { Invalid, Bool, Int, UInt, ..., UserType }</li></ul><h3>Module Functions</h3><ul><li><div class="fn" />QTextStream <b><a href="qtcore.html#bin">bin</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#bin">bin_</a></b> (QTextStream&#160;<i>s</i>)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#bom">bom</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#center">center</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#dec">dec</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#endl">endl</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#fixed">fixed</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#flush">flush</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#forcepoint">forcepoint</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#forcesign">forcesign</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#hex">hex</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#hex">hex_</a></b> (QTextStream&#160;<i>s</i>)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#left">left</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#lowercasebase">lowercasebase</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#lowercasedigits">lowercasedigits</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#noforcepoint">noforcepoint</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#noforcesign">noforcesign</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#noshowbase">noshowbase</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#oct">oct</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#oct">oct_</a></b> (QTextStream&#160;<i>s</i>)</li><li><div class="fn" /><b><a href="qtcore.html#pyqtRemoveInputHook">pyqtRemoveInputHook</a></b> ()</li><li><div class="fn" /><b><a href="qtcore.html#pyqtRestoreInputHook">pyqtRestoreInputHook</a></b> ()</li><li><div class="fn" />object <b><a href="qtcore.html#pyqtSignature">pyqtSignature</a></b> (str&#160;<i>signature</i>, str&#160;<i>result</i>&#160;=&#160;None)</li><li><div class="fn" />object <b><a href="qtcore.html#pyqtSlot">pyqtSlot</a></b> (str&#160;<i>signature</i>, str&#160;<i>name</i>&#160;=&#160;None, str&#160;<i>result</i>&#160;=&#160;None)</li><li><div class="fn" />QGenericArgument <b><a href="qtcore.html#Q_ARG">Q_ARG</a></b> (object&#160;<i>type</i>, object&#160;<i>data</i>)</li><li><div class="fn" /> <b><a href="qtcore.html#Q_ENUMS">Q_ENUMS</a></b> (...)</li><li><div class="fn" /> <b><a href="qtcore.html#Q_FLAGS">Q_FLAGS</a></b> (...)</li><li><div class="fn" />QGenericReturnArgument <b><a href="qtcore.html#Q_RETURN_ARG">Q_RETURN_ARG</a></b> (object&#160;<i>type</i>)</li><li><div class="fn" />float <b><a href="qtcore.html#qAbs">qAbs</a></b> (float)</li><li><div class="fn" /><b><a href="qtcore.html#qAddPostRoutine">qAddPostRoutine</a></b> (callable)</li><li><div class="fn" />int <b><a href="qtcore.html#qChecksum">qChecksum</a></b> (str)</li><li><div class="fn" />QByteArray <b><a href="qtcore.html#qCompress">qCompress</a></b> (QByteArray, int&#160;<i>compressionLevel</i>&#160;=&#160;-1)</li><li><div class="fn" /><b><a href="qtcore.html#qCritical">qCritical</a></b> (str)</li><li><div class="fn" /><b><a href="qtcore.html#qDebug">qDebug</a></b> (str)</li><li><div class="fn" /><b><a href="qtcore.html#qErrnoWarning">qErrnoWarning</a></b> (int&#160;<i>code</i>, str&#160;<i>msg</i>)</li><li><div class="fn" /><b><a href="qtcore.html#qErrnoWarning-2">qErrnoWarning</a></b> (str&#160;<i>msg</i>)</li><li><div class="fn" /><b><a href="qtcore.html#qFatal">qFatal</a></b> (str)</li><li><div class="fn" />bool <b><a href="qtcore.html#qFuzzyCompare">qFuzzyCompare</a></b> (float, float)</li><li><div class="fn" />float <b><a href="qtcore.html#qInf">qInf</a></b> ()</li><li><div class="fn" />callable <b><a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a></b> (callable)</li><li><div class="fn" />bool <b><a href="qtcore.html#qIsFinite">qIsFinite</a></b> (float)</li><li><div class="fn" />bool <b><a href="qtcore.html#qIsInf">qIsInf</a></b> (float)</li><li><div class="fn" />bool <b><a href="qtcore.html#qIsNaN">qIsNaN</a></b> (float)</li><li><div class="fn" />bool <b><a href="qtcore.html#qIsNull">qIsNull</a></b> (float)</li><li><div class="fn" />float <b><a href="qtcore.html#qQNaN">qQNaN</a></b> ()</li><li><div class="fn" />int <b><a href="qtcore.html#qrand">qrand</a></b> ()</li><li><div class="fn" />bool <b><a href="qtcore.html#qRegisterResourceData">qRegisterResourceData</a></b> (int, str, str, str)</li><li><div class="fn" /><b><a href="qtcore.html#qRemovePostRoutine">qRemovePostRoutine</a></b> (callable)</li><li><div class="fn" />int <b><a href="qtcore.html#qRound">qRound</a></b> (float)</li><li><div class="fn" />int <b><a href="qtcore.html#qRound64">qRound64</a></b> (float)</li><li><div class="fn" />QTextStreamManipulator <b><a href="qtcore.html#qSetFieldWidth">qSetFieldWidth</a></b> (int)</li><li><div class="fn" />QTextStreamManipulator <b><a href="qtcore.html#qSetPadChar">qSetPadChar</a></b> (QChar)</li><li><div class="fn" />QTextStreamManipulator <b><a href="qtcore.html#qSetRealNumberPrecision">qSetRealNumberPrecision</a></b> (int)</li><li><div class="fn" />bool <b><a href="qtcore.html#qSharedBuild">qSharedBuild</a></b> ()</li><li><div class="fn" />float <b><a href="qtcore.html#qSNaN">qSNaN</a></b> ()</li><li><div class="fn" /><b><a href="qtcore.html#qsrand">qsrand</a></b> (int)</li><li><div class="fn" /><b><a href="qtcore.html#qSwap">qSwap</a></b> (QBitArray, QBitArray)</li><li><div class="fn" /><b><a href="qtcore.html#qSwap-2">qSwap</a></b> (QByteArray, QByteArray)</li><li><div class="fn" /><b><a href="qtcore.html#qSwap-3">qSwap</a></b> (QString, QString)</li><li><div class="fn" /><b><a href="qtcore.html#qSwap-4">qSwap</a></b> (QUrl, QUrl)</li><li><div class="fn" /><b><a href="qtcore.html#qSwap-5">qSwap</a></b> (QVariant, QVariant)</li><li><div class="fn" />str <b><a href="qtcore.html#QT_TR_NOOP">QT_TR_NOOP</a></b> (str)</li><li><div class="fn" />str <b><a href="qtcore.html#QT_TR_NOOP_UTF8">QT_TR_NOOP_UTF8</a></b> (str)</li><li><div class="fn" />str <b><a href="qtcore.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a></b> (str, str)</li><li><div class="fn" />QByteArray <b><a href="qtcore.html#qUncompress">qUncompress</a></b> (QByteArray)</li><li><div class="fn" />bool <b><a href="qtcore.html#qUnregisterResourceData">qUnregisterResourceData</a></b> (int, str, str, str)</li><li><div class="fn" />str <b><a href="qtcore.html#qVersion">qVersion</a></b> ()</li><li><div class="fn" /><b><a href="qtcore.html#qWarning">qWarning</a></b> (str)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#reset">reset</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#right">right</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#scientific">scientific</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#showbase">showbase</a></b> (QTextStream)</li><li><div class="fn" />str <b><a href="qtcore.html#SIGNAL">SIGNAL</a></b> (str)</li><li><div class="fn" />str <b><a href="qtcore.html#SLOT">SLOT</a></b> (str)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#uppercasebase">uppercasebase</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#uppercasedigits">uppercasedigits</a></b> (QTextStream)</li><li><div class="fn" />QTextStream <b><a href="qtcore.html#ws">ws</a></b> (QTextStream)</li></ul><h3>Module Members</h3><ul><li><div class="fn" />int <b><a href="qtcore.html#PYQT_VERSION-var">PYQT_VERSION</a></b></li><li><div class="fn" />str <b><a href="qtcore.html#PYQT_VERSION_STR-var">PYQT_VERSION_STR</a></b></li><li><div class="fn" />int <b><a href="qtcore.html#QT_VERSION-var">QT_VERSION</a></b></li><li><div class="fn" />str <b><a href="qtcore.html#QT_VERSION_STR-var">QT_VERSION_STR</a></b></li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QtCore module contains non-GUI functionality.</p>

<p>All other PyQt modules rely on this module. To import the module use, for
example, the following statement:</p>

<pre>from PyQt4 import QtCore</pre>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="QtMsgType-enum" />QtMsgType</h3><p>This enum describes the messages that can be sent to a message handler (<a href="qtcore.html#QtMsgHandler-typedef">QtMsgHandler</a>). You can use the enum to identify and associate the various message types with the appropriate actions.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QtDebugMsg</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">A message generated by the <a href="qtcore.html#qDebug">qDebug</a>() function.</td></tr>
<tr><td valign="top"><tt>QtWarningMsg</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">A message generated by the <a href="qtcore.html#qWarning">qWarning</a>() function.</td></tr>
<tr><td valign="top"><tt>QtCriticalMsg</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">A message generated by the <a href="qtcore.html#qCritical">qCritical</a>() function.</td></tr>
<tr><td valign="top"><tt>QtFatalMsg</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">A message generated by the <a href="qtcore.html#qFatal">qFatal</a>() function.</td></tr>
<tr><td valign="top"><tt>QtSystemMsg</tt></td><td align="center" valign="top"><tt>QtCriticalMsg</tt></td><td valign="top">&#160;</td></tr>
</table></p>
<p>See also <a href="qtcore.html#QtMsgHandler-typedef">QtMsgHandler</a> and <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<a name="//apple_ref/cpp/tdef//qint8" />
<h3 class="fn"><a name="Type-enum" />Type</h3><hr /><h2>Function Documentation</h2><h3 class="fn"><a name="bin" /><a href="qtextstream.html">QTextStream</a> bin (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setIntegerBase(2) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#oct">oct</a>(), <a href="qtcore.html#dec">dec</a>(), <a href="qtcore.html#hex">hex</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//bom" />
<h3 class="fn"><a name="bin" /><a href="qtextstream.html">QTextStream</a> bin_ (<a href="qtextstream.html">QTextStream</a>&#160;<i>s</i>)</h3><p>Calls QTextStream.setIntegerBase(2) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#oct">oct</a>(), <a href="qtcore.html#dec">dec</a>(), <a href="qtcore.html#hex">hex</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//bom" />
<h3 class="fn"><a name="bom" /><a href="qtextstream.html">QTextStream</a> bom (<a href="qtextstream.html">QTextStream</a>)</h3><p>Toggles insertion of the Byte Order Mark on <i>stream</i> when <a href="qtextstream.html">QTextStream</a> is used with a UTF codec.</p>
<p>See also <a href="qtextstream.html#setGenerateByteOrderMark">QTextStream.setGenerateByteOrderMark</a>() and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//center" />
<h3 class="fn"><a name="center" /><a href="qtextstream.html">QTextStream</a> center (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setFieldAlignment(<a href="qtextstream.html#FieldAlignment-enum">QTextStream.AlignCenter</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#left">left</a>(), <a href="qtcore.html#right">right</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//dec" />
<h3 class="fn"><a name="dec" /><a href="qtextstream.html">QTextStream</a> dec (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setIntegerBase(10) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#bin">bin</a>(), <a href="qtcore.html#oct">oct</a>(), <a href="qtcore.html#hex">hex</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//endl" />
<h3 class="fn"><a name="endl" /><a href="qtextstream.html">QTextStream</a> endl (<a href="qtextstream.html">QTextStream</a>)</h3><p>Writes '\n' to the <i>stream</i> and flushes the stream.</p>
<p>Equivalent to</p>
<pre> stream &lt;&lt; '\n' &lt;&lt; flush;</pre>
<p>Note: On Windows, all '\n' characters are written as '\r\n' if <a href="qtextstream.html">QTextStream</a>'s device or string is opened using the <a href="qiodevice.html#OpenModeFlag-enum">QIODevice.Text</a> flag.</p>
<p>See also <a href="qtcore.html#flush">flush</a>(), <a href="qtcore.html#reset">reset</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//fixed" />
<h3 class="fn"><a name="fixed" /><a href="qtextstream.html">QTextStream</a> fixed (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setRealNumberNotation(<a href="qtextstream.html#RealNumberNotation-enum">QTextStream.FixedNotation</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#scientific">scientific</a>() and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//flush" />
<h3 class="fn"><a name="flush" /><a href="qtextstream.html">QTextStream</a> flush (<a href="qtextstream.html">QTextStream</a>)</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>
<a name="//apple_ref/cpp/instm/QTextStream/generateByteOrderMark" />
<h3 class="fn"><a name="forcepoint" /><a href="qtextstream.html">QTextStream</a> forcepoint (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">QTextStream.ForcePoint</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#noforcepoint">noforcepoint</a>(), <a href="qtcore.html#forcesign">forcesign</a>(), <a href="qtcore.html#showbase">showbase</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//forcesign" />
<h3 class="fn"><a name="forcesign" /><a href="qtextstream.html">QTextStream</a> forcesign (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">QTextStream.ForceSign</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#noforcesign">noforcesign</a>(), <a href="qtcore.html#forcepoint">forcepoint</a>(), <a href="qtcore.html#showbase">showbase</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//hex" />
<h3 class="fn"><a name="hex" /><a href="qtextstream.html">QTextStream</a> hex (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setIntegerBase(16) on <i>stream</i> and returns <i>stream</i>.</p>
<p><b>Note:</b> The hex modifier can only be used for writing to streams.</p>
<p>See also <a href="qtcore.html#bin">bin</a>(), <a href="qtcore.html#oct">oct</a>(), <a href="qtcore.html#dec">dec</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//left" />
<h3 class="fn"><a name="hex" /><a href="qtextstream.html">QTextStream</a> hex_ (<a href="qtextstream.html">QTextStream</a>&#160;<i>s</i>)</h3><p>Calls QTextStream.setIntegerBase(16) on <i>stream</i> and returns <i>stream</i>.</p>
<p><b>Note:</b> The hex modifier can only be used for writing to streams.</p>
<p>See also <a href="qtcore.html#bin">bin</a>(), <a href="qtcore.html#oct">oct</a>(), <a href="qtcore.html#dec">dec</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//left" />
<h3 class="fn"><a name="left" /><a href="qtextstream.html">QTextStream</a> left (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setFieldAlignment(<a href="qtextstream.html#FieldAlignment-enum">QTextStream.AlignLeft</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#right">right</a>(), <a href="qtcore.html#center">center</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//lowercasebase" />
<h3 class="fn"><a name="lowercasebase" /><a href="qtextstream.html">QTextStream</a> lowercasebase (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() &amp; ~<a href="qtextstream.html#NumberFlag-enum">QTextStream.UppercaseBase</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#uppercasebase">uppercasebase</a>(), <a href="qtcore.html#lowercasedigits">lowercasedigits</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//lowercasedigits" />
<h3 class="fn"><a name="lowercasedigits" /><a href="qtextstream.html">QTextStream</a> lowercasedigits (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() &amp; ~<a href="qtextstream.html#NumberFlag-enum">QTextStream.UppercaseDigits</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#uppercasedigits">uppercasedigits</a>(), <a href="qtcore.html#lowercasebase">lowercasebase</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//noforcepoint" />
<h3 class="fn"><a name="noforcepoint" /><a href="qtextstream.html">QTextStream</a> noforcepoint (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() &amp; ~<a href="qtextstream.html#NumberFlag-enum">QTextStream.ForcePoint</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#forcepoint">forcepoint</a>(), <a href="qtcore.html#noforcesign">noforcesign</a>(), <a href="qtcore.html#noshowbase">noshowbase</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//noforcesign" />
<h3 class="fn"><a name="noforcesign" /><a href="qtextstream.html">QTextStream</a> noforcesign (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() &amp; ~<a href="qtextstream.html#NumberFlag-enum">QTextStream.ForceSign</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#forcesign">forcesign</a>(), <a href="qtcore.html#noforcepoint">noforcepoint</a>(), <a href="qtcore.html#noshowbase">noshowbase</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//noshowbase" />
<h3 class="fn"><a name="noshowbase" /><a href="qtextstream.html">QTextStream</a> noshowbase (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() &amp; ~<a href="qtextstream.html#NumberFlag-enum">QTextStream.ShowBase</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#showbase">showbase</a>(), <a href="qtcore.html#noforcesign">noforcesign</a>(), <a href="qtcore.html#noforcepoint">noforcepoint</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//oct" />
<h3 class="fn"><a name="oct" /><a href="qtextstream.html">QTextStream</a> oct (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setIntegerBase(8) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#bin">bin</a>(), <a href="qtcore.html#dec">dec</a>(), <a href="qtcore.html#hex">hex</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//qSetFieldWidth" />
<h3 class="fn"><a name="oct" /><a href="qtextstream.html">QTextStream</a> oct_ (<a href="qtextstream.html">QTextStream</a>&#160;<i>s</i>)</h3><p>Calls QTextStream.setIntegerBase(8) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#bin">bin</a>(), <a href="qtcore.html#dec">dec</a>(), <a href="qtcore.html#hex">hex</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//qSetFieldWidth" />
<h3 class="fn"><a name="pyqtRemoveInputHook" />pyqtRemoveInputHook ()</h3><p>When the QtCore module is imported for the first time it installs a Python
input hook (ie. it sets the value of Python's PyOS_InputHook variable). This
allows commands to be entered at the interpreter prompt while the application
is running. It is then possible to dynamically create new Qt objects and call
the methods of any existing Qt object.</p>

<p>The input hook can cause problems for certain types of application,
particularly those that provide a similar facility through different means.
This function removes the input hook installed by PyQt.</p>

<p>The input hook can be restored using the
<a href="qtcore.html#pyqtRestoreInputHook">pyqtRestoreInputHook()</a>
function.</p>
<h3 class="fn"><a name="pyqtRestoreInputHook" />pyqtRestoreInputHook ()</h3><p>When the QtCore module is imported for the first time it installs a Python
input hook (ie. it sets the value of Python's PyOS_InputHook variable). This
allows commands to be entered at the interpreter prompt while the application
is running. It is then possible to dynamically create new Qt objects and call
the methods of any existing Qt object.</p>

<p>The input hook can cause problems for certain types of application,
particularly those that provide a similar facility through different means, and
so the <a href="qtcore.html#pyqtRemoveInputHook">pyqtRemoveInputHook()</a>
function is provided to remove it.</p>

<p>This function will restore the input hook if it has been removed.</p>
<h3 class="fn"><a name="pyqtSignature" />object pyqtSignature (str&#160;<i>signature</i>, str&#160;<i>result</i>&#160;=&#160;None)</h3><h3 class="fn"><a name="pyqtSlot" />object pyqtSlot (str&#160;<i>signature</i>, str&#160;<i>name</i>&#160;=&#160;None, str&#160;<i>result</i>&#160;=&#160;None)</h3><h3 class="fn"><a name="Q_ARG" />QGenericArgument Q_ARG (object&#160;<i>type</i>, object&#160;<i>data</i>)</h3><h3 class="fn"><a name="Q_ENUMS" /> Q_ENUMS (...)</h3><h3 class="fn"><a name="Q_FLAGS" /> Q_FLAGS (...)</h3><h3 class="fn"><a name="Q_RETURN_ARG" />QGenericReturnArgument Q_RETURN_ARG (object&#160;<i>type</i>)</h3><h3 class="fn"><a name="qAbs" />float qAbs (float)</h3><p>Compares <i>value</i> to the 0 of type T and returns the absolute value. Thus if T is <i>double</i>, then <i>value</i> is compared to <i>(double) 0</i>.</p>
<p>Example:</p>
<pre> int absoluteValue;
 int myValue = -4;

 absoluteValue = qAbs(myValue);
<span class="comment"> // absoluteValue == 4</span></pre>
<a name="//apple_ref/cpp/func//qBound" />
<h3 class="fn"><a name="qAddPostRoutine" />qAddPostRoutine (callable)</h3><h3 class="fn"><a name="qChecksum" />int qChecksum (str)</h3><p>Returns the CRC-16 checksum of the first <i>len</i> bytes of <i>data</i>.</p>
<p>The checksum is independent of the byte order (endianness).</p>
<p><b>Note:</b> This function is a 16-bit cache conserving (16 entry table) implementation of the CRC-16-CCITT algorithm.</p>
<a name="//apple_ref/cpp/func//qCompress" />
<h3 class="fn"><a name="qCompress" /><a href="qbytearray.html">QByteArray</a> qCompress (<a href="qbytearray.html">QByteArray</a>, int&#160;<i>compressionLevel</i>&#160;=&#160;-1)</h3><p>Compresses the <i>data</i> byte array and returns the compressed data in a new byte array.</p>
<p>The <i>compressionLevel</i> parameter specifies how much compression should be used. Valid values are between 0 and 9, with 9 corresponding to the greatest compression (i.e. smaller compressed data) at the cost of using a slower algorithm. Smaller values (8, 7, ..., 1) provide successively less compression at slightly faster speeds. The value 0 corresponds to no compression at all. The default value is -1, which specifies zlib's default compression.</p>
<p>See also <a href="qtcore.html#qUncompress">qUncompress</a>().</p>
<h3 class="fn"><a name="qCritical" />qCritical (str)</h3><p>Calls the message handler with the critical message <i>msg</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger.</p>
<p>This function takes a format string and a list of arguments, similar to the C printf() function. The format should be a Latin-1 string.</p>
<p>Example:</p>
<pre> void load(const QString &amp;fileName)
 {
     QFile file(fileName);
     if (!file.exists())
         qCritical("File '%s' does not exist!", qPrintable(fileName));
 }</pre>
<p>If you include &lt;QtDebug&gt;, a more convenient syntax is also available:</p>
<pre> qCritical() &lt;&lt; "Brush:" &lt;&lt; myQBrush &lt;&lt; "Other
 value:" &lt;&lt; i;</pre>
<p>A space is inserted between the items, and a newline is appended at the end.</p>
<p>To supress the output at runtime, install your own message handler with <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p>See also <a href="qtcore.html#qDebug">qDebug</a>(), <a href="qtcore.html#qWarning">qWarning</a>(), <a href="qtcore.html#qFatal">qFatal</a>(), <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<a name="//apple_ref/cpp/func//qDebug" />
<h3 class="fn"><a name="qDebug" />qDebug (str)</h3><p>Calls the message handler with the debug message <i>msg</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the console, if it is a console application; otherwise, it is sent to the debugger. This function does nothing if <tt>QT_NO_DEBUG_OUTPUT</tt> was defined during compilation.</p>
<p>If you pass the function a format string and a list of arguments, it works in similar way to the C printf() function. The format should be a Latin-1 string.</p>
<p>Example:</p>
<pre> qDebug("Items in list: %d", myList.size());</pre>
<p>If you include <tt>&lt;QtDebug&gt;</tt>, a more convenient syntax is also available:</p>
<pre> qDebug() &lt;&lt; "Brush:" &lt;&lt; myQBrush &lt;&lt; "Other value:" &lt;&lt; i;</pre>
<p>With this syntax, the function returns a <a href="qdebug.html">QDebug</a> object that is configured to use the <a href="qtcore.html#QtMsgType-enum">QtDebugMsg</a> message type. It automatically puts a single space between each item, and outputs a newline at the end. It supports many C++ and Qt types.</p>
<p>To suppress the output at run-time, install your own message handler with <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p>See also <a href="qtcore.html#qWarning">qWarning</a>(), <a href="qtcore.html#qCritical">qCritical</a>(), <a href="qtcore.html#qFatal">qFatal</a>(), <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<a name="//apple_ref/cpp/func//qFatal" />
<h3 class="fn"><a name="qErrnoWarning" />qErrnoWarning (int&#160;<i>code</i>, str&#160;<i>msg</i>)</h3><h3 class="fn"><a name="qErrnoWarning-2" />qErrnoWarning (str&#160;<i>msg</i>)</h3><h3 class="fn"><a name="qFatal" />qFatal (str)</h3><p>Calls the message handler with the fatal message <i>msg</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger.</p>
<p>If you are using the <b>default message handler</b> this function will abort on Unix systems to create a core dump. On Windows, for debug builds, this function will report a _CRT_ERROR enabling you to connect a debugger to the application.</p>
<p>This function takes a format string and a list of arguments, similar to the C printf() function.</p>
<p>Example:</p>
<pre> int divide(int a, int b)
 {
     if (b == 0)                                <span class="comment">// program error</span>
         qFatal("divide: cannot divide by zero");
     return a / b;
 }</pre>
<p>To supress the output at runtime, install your own message handler with <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p>See also <a href="qtcore.html#qDebug">qDebug</a>(), <a href="qtcore.html#qCritical">qCritical</a>(), <a href="qtcore.html#qWarning">qWarning</a>(), <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<a name="//apple_ref/cpp/clm//qFuzzyCompare" />
<h3 class="fn"><a name="qFuzzyCompare" />bool qFuzzyCompare (float, float)</h3><p>Compares the floating point value <i>p1</i> and <i>p2</i> and returns <tt>true</tt> if they are considered equal, otherwise <tt>false</tt>.</p>
<p>Note that comparing values where either <i>p1</i> or <i>p2</i> is 0.0 will not work. The solution to this is to compare against values greater than or equal to 1.0.</p>
<pre>         <span class="comment">// Instead of comparing with 0.0</span>
                 qFuzzyCompare(0.0,1.0e-200); <span class="comment">// This will return false</span>
         <span class="comment">// Compare adding 1 to both values will fix the problem</span>
                 qFuzzyCompare(1 + 0.0, 1 + 1.0e-200); <span class="comment">// This will return true</span></pre>
<p>The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are.</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p>This function was introduced in Qt 4.4.</p>
<h3 class="fn"><a name="qInf" />float qInf ()</h3><h3 class="fn"><a name="qInstallMsgHandler" />callable qInstallMsgHandler (callable)</h3><p>The <i>callable</i> argument may also be None.</p><p>Installs a Qt message <i>handler</i> which has been defined previously. Returns a pointer to the previous message handler (which may be 0).</p>
<p>The message handler is a function that prints out debug messages, warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) occur. Qt built in release mode also contains such warnings unless QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages.</p>
<p>The default message handler prints the message to the standard output under X11 or to the debugger under Windows. If it is a fatal message, the application aborts immediately.</p>
<p>Only one message handler can be defined, since this is usually done on an application-wide basis to control debug output.</p>
<p>To restore the message handler, call <tt>qInstallMsgHandler(0)</tt>.</p>
<p>Example:</p>
<pre> #include &lt;qapplication.h&gt;
 #include &lt;stdio.h&gt;
 #include &lt;stdlib.h&gt;

 void myMessageOutput(QtMsgType type, const char *msg)
 {
     switch (type) {
     case QtDebugMsg:
         fprintf(stderr, "Debug: %s\n", msg);
         break;
     case QtWarningMsg:
         fprintf(stderr, "Warning: %s\n", msg);
         break;
     case QtCriticalMsg:
         fprintf(stderr, "Critical: %s\n", msg);
         break;
     case QtFatalMsg:
         fprintf(stderr, "Fatal: %s\n", msg);
         abort();
     }
 }

 int main(int argc, char **argv)
 {
     qInstallMsgHandler(myMessageOutput);
     QApplication app(argc, argv);
     ...
     return app.exec();
 }</pre>
<p>See also <a href="qtcore.html#qDebug">qDebug</a>(), <a href="qtcore.html#qWarning">qWarning</a>(), <a href="qtcore.html#qCritical">qCritical</a>(), <a href="qtcore.html#qFatal">qFatal</a>(), <a href="qtcore.html#QtMsgType-enum">QtMsgType</a>, and <a href="debug.html">Debugging Techniques</a>.</p>
<a name="//apple_ref/cpp/func//qMacVersion" />
<h3 class="fn"><a name="qIsFinite" />bool qIsFinite (float)</h3><h3 class="fn"><a name="qIsInf" />bool qIsInf (float)</h3><h3 class="fn"><a name="qIsNaN" />bool qIsNaN (float)</h3><h3 class="fn"><a name="qIsNull" />bool qIsNull (float)</h3><h3 class="fn"><a name="qQNaN" />float qQNaN ()</h3><h3 class="fn"><a name="qrand" />int qrand ()</h3><p>Thread-safe version of the standard C++ <tt>rand()</tt> function.</p>
<p>Returns a value between 0 and <tt>RAND_MAX</tt> (defined in <tt>&lt;cstdlib&gt;</tt> and <tt>&lt;stdlib.h&gt;</tt>), the next number in the current sequence of pseudo-random integers.</p>
<p>Use <tt>qsrand()</tt> to initialize the pseudo-random number generator with a seed value.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qtcore.html#qsrand">qsrand</a>().</p>
<a name="//apple_ref/cpp/func//qsrand" />
<h3 class="fn"><a name="qRegisterResourceData" />bool qRegisterResourceData (int, str, str, str)</h3><h3 class="fn"><a name="qRemovePostRoutine" />qRemovePostRoutine (callable)</h3><h3 class="fn"><a name="qRound" />int qRound (float)</h3><p>Rounds <i>value</i> to the nearest integer.</p>
<p>Example:</p>
<pre> qreal valueA = 2.3;
 qreal valueB = 2.7;

 int roundedValueA = qRound(valueA);
<span class="comment"> // roundedValueA = 2</span>
 int roundedValueB = qRound(valueB);
<span class="comment"> // roundedValueB = 3</span></pre>
<a name="//apple_ref/cpp/func//qVersion" />
<h3 class="fn"><a name="qRound64" />int qRound64 (float)</h3><p>Rounds <i>value</i> to the nearest 64-bit integer.</p>
<p>Example:</p>
<pre> qreal valueA = 42949672960.3;
 qreal valueB = 42949672960.7;

 int roundedValueA = qRound(valueA);
<span class="comment"> // roundedValueA = 42949672960</span>
 int roundedValueB = qRound(valueB);
<span class="comment"> // roundedValueB = 42949672961</span></pre>
<a name="//apple_ref/cpp/func//qRound" />
<h3 class="fn"><a name="qSetFieldWidth" />QTextStreamManipulator qSetFieldWidth (int)</h3><p>Equivalent to QTextStream.setFieldWidth(<i>width</i>).</p>
<a name="//apple_ref/cpp/func//qSetPadChar" />
<h3 class="fn"><a name="qSetPadChar" />QTextStreamManipulator qSetPadChar (QChar)</h3><p>Equivalent to QTextStream.setPadChar(<i>ch</i>).</p>
<a name="//apple_ref/cpp/func//qSetRealNumberPrecision" />
<h3 class="fn"><a name="qSetRealNumberPrecision" />QTextStreamManipulator qSetRealNumberPrecision (int)</h3><p>Equivalent to QTextStream.setRealNumberPrecision(<i>precision</i>).</p>
<a name="//apple_ref/cpp/func//reset" />
<h3 class="fn"><a name="qSharedBuild" />bool qSharedBuild ()</h3><h3 class="fn"><a name="qSNaN" />float qSNaN ()</h3><h3 class="fn"><a name="qsrand" />qsrand (int)</h3><p>Thread-safe version of the standard C++ <tt>srand()</tt> function.</p>
<p>Sets the argument <i>seed</i> to be used to generate a new random number sequence of pseudo random integers to be returned by <a href="qtcore.html#qrand">qrand</a>().</p>
<p>The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently calls <a href="qtcore.html#qrand">qrand</a>(), the threads will get the same random number sequence.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qtcore.html#qrand">qrand</a>().</p>
<a name="//apple_ref/cpp/func//qtTrId" />
<h3 class="fn"><a name="qSwap" />qSwap (<a href="qbitarray.html">QBitArray</a>, <a href="qbitarray.html">QBitArray</a>)</h3><h3 class="fn"><a name="qSwap-2" />qSwap (<a href="qbytearray.html">QByteArray</a>, <a href="qbytearray.html">QByteArray</a>)</h3><h3 class="fn"><a name="qSwap-3" />qSwap (QString, QString)</h3><h3 class="fn"><a name="qSwap-4" />qSwap (<a href="qurl.html">QUrl</a>, <a href="qurl.html">QUrl</a>)</h3><h3 class="fn"><a name="qSwap-5" />qSwap (QVariant, QVariant)</h3><h3 class="fn"><a name="QT_TR_NOOP" />str QT_TR_NOOP (str)</h3><p>Marks the string literal <i>sourceText</i> for dynamic translation in the current context (class), i.e the stored <i>sourceText</i> will not be altered.</p>
<p>The macro expands to <i>sourceText</i>.</p>
<p>Example:</p>
<pre> QString FriendlyConversation.greeting(int type)
 {
 static const char *greeting_strings[] = {
     QT_TR_NOOP("Hello"),
     QT_TR_NOOP("Goodbye")
 };
 return tr(greeting_strings[type]);
 }</pre>
<p>The macro QT_TR_NOOP_UTF8() is identical except that it tells lupdate that the source string is encoded in UTF-8. Corresponding variants exist in the <a href="qtcore.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a>() family of macros, too. Note that using these macros is not required if <tt>CODECFORTR</tt> is already set to UTF-8 in the qmake project file.</p>
<p>See also <a href="qtcore.html#QT_TRANSLATE_NOOP">QT_TRANSLATE_NOOP</a>() and <a href="internationalization.html">Internationalization with Qt</a>.</p>
<a name="//apple_ref/cpp/macro//QT_VERSION" />
<h3 class="fn"><a name="QT_TR_NOOP_UTF8" />str QT_TR_NOOP_UTF8 (str)</h3><h3 class="fn"><a name="QT_TRANSLATE_NOOP" />str QT_TRANSLATE_NOOP (str, str)</h3><p>Marks the string literal <i>sourceText</i> for dynamic translation in the given <i>context</i>; i.e, the stored <i>sourceText</i> will not be altered. The <i>context</i> is typically a class and also needs to be specified as string literal.</p>
<p>The macro expands to <i>sourceText</i>.</p>
<p>Example:</p>
<pre> static const char *greeting_strings[] = {
     QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
     QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
 };

 QString FriendlyConversation.greeting(int type)
 {
     return tr(greeting_strings[type]);
 }

 QString global_greeting(int type)
 {
     return qApp-&gt;translate("FriendlyConversation",
            greeting_strings[type]);
 }</pre>
<p>See also <a href="qtcore.html#QT_TR_NOOP">QT_TR_NOOP</a>(), <a href="qtcore.html#QT_TRANSLATE_NOOP3">QT_TRANSLATE_NOOP3</a>(), and <a href="internationalization.html">Internationalization with Qt</a>.</p>
<a name="//apple_ref/cpp/macro//QT_TRAP_THROWING" />
<h3 class="fn"><a name="qUncompress" /><a href="qbytearray.html">QByteArray</a> qUncompress (<a href="qbytearray.html">QByteArray</a>)</h3><p>Uncompresses the <i>data</i> byte array and returns a new byte array with the uncompressed data.</p>
<p>Returns an empty <a href="qbytearray.html">QByteArray</a> if the input data was corrupt.</p>
<p>This function will uncompress data compressed with <a href="qtcore.html#qCompress">qCompress</a>() from this and any earlier Qt version, back to Qt 3.1 when this feature was added.</p>
<p><b>Note:</b> If you want to use this function to uncompress external data compressed using zlib, you first need to prepend four bytes to the byte array that contain the expected length (as an unsigned integer) of the uncompressed data encoded in big-endian order (most significant byte first).</p>
<p>See also <a href="qtcore.html#qCompress">qCompress</a>().</p>
<h3 class="fn"><a name="qUnregisterResourceData" />bool qUnregisterResourceData (int, str, str, str)</h3><h3 class="fn"><a name="qVersion" />str qVersion ()</h3><p>Returns the version number of Qt at run-time as a string (for example, "4.1.2"). This may be a different version than the version the application was compiled against.</p>
<p>See also <a href="qtcore.html#QT_VERSION_STR">QT_VERSION_STR</a>.</p>
<a name="//apple_ref/cpp/func//qWarning" />
<h3 class="fn"><a name="qWarning" />qWarning (str)</h3><p>Calls the message handler with the warning message <i>msg</i>. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. This function does nothing if <tt>QT_NO_WARNING_OUTPUT</tt> was defined during compilation; it exits if the environment variable <tt>QT_FATAL_WARNINGS</tt> is defined.</p>
<p>This function takes a format string and a list of arguments, similar to the C printf() function. The format should be a Latin-1 string.</p>
<p>Example:</p>
<pre> void f(int c)
 {
     if (c &gt; 200)
         qWarning("f: bad argument, c == %d", c);
 }</pre>
<p>If you include &lt;QtDebug&gt;, a more convenient syntax is also available:</p>
<pre> qWarning() &lt;&lt; "Brush:" &lt;&lt; myQBrush &lt;&lt; "Other value:"
 &lt;&lt; i;</pre>
<p>This syntax inserts a space between each item, and appends a newline at the end.</p>
<p>To supress the output at runtime, install your own message handler with <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>().</p>
<p>See also <a href="qtcore.html#qDebug">qDebug</a>(), <a href="qtcore.html#qCritical">qCritical</a>(), <a href="qtcore.html#qFatal">qFatal</a>(), <a href="qtcore.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging Techniques</a>.</p>
<a name="//apple_ref/cpp/func//q_check_ptr" />
<h3 class="fn"><a name="reset" /><a href="qtextstream.html">QTextStream</a> reset (<a href="qtextstream.html">QTextStream</a>)</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>
<a name="//apple_ref/cpp/instm/QTextStream/resetStatus" />
<h3 class="fn"><a name="right" /><a href="qtextstream.html">QTextStream</a> right (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setFieldAlignment(<a href="qtextstream.html#FieldAlignment-enum">QTextStream.AlignRight</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#left">left</a>(), <a href="qtcore.html#center">center</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//scientific" />
<h3 class="fn"><a name="scientific" /><a href="qtextstream.html">QTextStream</a> scientific (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setRealNumberNotation(<a href="qtextstream.html#RealNumberNotation-enum">QTextStream.ScientificNotation</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#fixed">fixed</a>() and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//showbase" />
<h3 class="fn"><a name="showbase" /><a href="qtextstream.html">QTextStream</a> showbase (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">QTextStream.ShowBase</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#noshowbase">noshowbase</a>(), <a href="qtcore.html#forcesign">forcesign</a>(), <a href="qtcore.html#forcepoint">forcepoint</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//uppercasebase" />
<h3 class="fn"><a name="SIGNAL" />str SIGNAL (str)</h3><h3 class="fn"><a name="SLOT" />str SLOT (str)</h3><h3 class="fn"><a name="uppercasebase" /><a href="qtextstream.html">QTextStream</a> uppercasebase (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">QTextStream.UppercaseBase</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#lowercasebase">lowercasebase</a>(), <a href="qtcore.html#uppercasedigits">uppercasedigits</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//uppercasedigits" />
<h3 class="fn"><a name="uppercasedigits" /><a href="qtextstream.html">QTextStream</a> uppercasedigits (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls QTextStream.setNumberFlags(<a href="qtextstream.html#numberFlags">QTextStream.numberFlags</a>() | <a href="qtextstream.html#NumberFlag-enum">QTextStream.UppercaseDigits</a>) on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtcore.html#lowercasedigits">lowercasedigits</a>(), <a href="qtcore.html#uppercasebase">uppercasebase</a>(), and <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<a name="//apple_ref/cpp/func//ws" />
<h3 class="fn"><a name="ws" /><a href="qtextstream.html">QTextStream</a> ws (<a href="qtextstream.html">QTextStream</a>)</h3><p>Calls skipWhiteSpace() on <i>stream</i> and returns <i>stream</i>.</p>
<p>See also <a href="qtextstream.html#qtextstream-manipulators">QTextStream manipulators</a>.</p>
<p /><hr /><h2>Member Documentation</h2><h3 class="fn"><a name="PYQT_VERSION-var" />int PYQT_VERSION</h3><p>This member should be treated as a constant.</p><h3 class="fn"><a name="PYQT_VERSION_STR-var" />str PYQT_VERSION_STR</h3><p>This member should be treated as a constant.</p><h3 class="fn"><a name="QT_VERSION-var" />int QT_VERSION</h3><p>This member should be treated as a constant.</p><h3 class="fn"><a name="QT_VERSION_STR-var" />str QT_VERSION_STR</h3><p>This member should be treated as a constant.</p><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>