File: quuid.html

package info (click to toggle)
python-qt4 4.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 40,300 kB
  • ctags: 6,185
  • sloc: python: 125,988; cpp: 13,291; xml: 292; makefile: 246; php: 27; sh: 2
file content (402 lines) | stat: -rw-r--r-- 21,163 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
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<?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>QUuid 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">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.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">QUuid Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QUuid class stores a Universally Unique Identifier (UUID).
<a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="quuid.html#Variant-enum">Variant</a></b> { VarUnknown, NCS, DCE, Microsoft, Reserved }</li><li><div class="fn" />enum <b><a href="quuid.html#Version-enum">Version</a></b> { VerUnknown, Time, EmbeddedPOSIX, Name, Random }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="quuid.html#QUuid">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="quuid.html#QUuid-2">__init__</a></b> (<i>self</i>, int&#160;<i>l</i>, int&#160;<i>w1</i>, int&#160;<i>w2</i>, bytes&#160;<i>b1</i>, bytes&#160;<i>b2</i>, bytes&#160;<i>b3</i>, bytes&#160;<i>b4</i>, bytes&#160;<i>b5</i>, bytes&#160;<i>b6</i>, bytes&#160;<i>b7</i>, bytes&#160;<i>b8</i>)</li><li><div class="fn" /><b><a href="quuid.html#QUuid-3">__init__</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="quuid.html#QUuid-4">__init__</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="quuid.html#QUuid-5">__init__</a></b> (<i>self</i>, QUuid)</li><li><div class="fn" />bool <b><a href="quuid.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="quuid.html#toByteArray">toByteArray</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="quuid.html#toRfc4122">toRfc4122</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="quuid.html#toString">toString</a></b> (<i>self</i>)</li><li><div class="fn" />Variant <b><a href="quuid.html#variant">variant</a></b> (<i>self</i>)</li><li><div class="fn" />Version <b><a href="quuid.html#version">version</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QUuid <b><a href="quuid.html#createUuid">createUuid</a></b> ()</li><li><div class="fn" />QUuid <b><a href="quuid.html#fromRfc4122">fromRfc4122</a></b> (QByteArray)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="quuid.html#__eq__">__eq__</a></b> (<i>self</i>, QUuid&#160;<i>orig</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__ge__">__ge__</a></b> (<i>self</i>, QUuid&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__gt__">__gt__</a></b> (<i>self</i>, QUuid&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__le__">__le__</a></b> (<i>self</i>, QUuid&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__lt__">__lt__</a></b> (<i>self</i>, QUuid&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__ne__">__ne__</a></b> (<i>self</i>, QUuid&#160;<i>orig</i>)</li><li><div class="fn" />object <b><a href="quuid.html#__repr__">__repr__</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QUuid class stores a Universally Unique Identifier
(UUID).</p>
<p>Using <i>U</i>niversally <i>U</i>nique <i>ID</i>entifiers (UUID)
is a standard way to uniquely identify entities in a distributed
computing environment. A UUID is a 16-byte (128-bit) number
generated by some algorithm that is meant to guarantee that the
UUID will be unique in the distributed computing environment where
it is used. The acronym GUID is often used instead, <i>G</i>lobally
<i>U</i>nique <i>ID</i>entifiers, but it refers to the same
thing.</p>
<a id="variant-field" name="variant-field" />
<p>Actually, the GUID is one <i>variant</i> of UUID. Multiple
variants are in use. Each UUID contains a bit field that specifies
which type (variant) of UUID it is. Call <a href="quuid.html#variant">variant</a>() to discover which type of UUID
an instance of QUuid contains. It extracts the three most
signifcant bits of byte 8 of the 16 bytes. In QUuid, byte 8 is
<tt>QUuid.data4[0]</tt>. If you create instances of QUuid using
the constructor that accepts all the numeric values as parameters,
use the following table to set the three most significant bits of
parameter <tt>b1</tt>, which becomes <tt>QUuid.data4[0]</tt> and
contains the variant field in its three most significant bits. In
the table, 'x' means <i>don't care</i>.</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>msb0</th>
<th>msb1</th>
<th>msb2</th>
<th>Variant</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>0</td>
<td>x</td>
<td>x</td>
<td>NCS (Network Computing System)</td>
</tr>
<tr class="even" valign="top">
<td>1</td>
<td>0</td>
<td>x</td>
<td>DCE (Distributed Computing Environment)</td>
</tr>
<tr class="odd" valign="top">
<td>1</td>
<td>1</td>
<td>0</td>
<td>Microsoft (GUID)</td>
</tr>
<tr class="even" valign="top">
<td>1</td>
<td>1</td>
<td>1</td>
<td>Reserved for future expansion</td>
</tr>
</table>
<a id="version-field" name="version-field" />
<p>If <a href="quuid.html#variant">variant</a>() returns <a href="quuid.html#Variant-enum">QUuid.DCE</a>, the UUID also contains a
<i>version</i> field in the four most significant bits of
<tt>QUuid.data3</tt>, and you can call <a href="quuid.html#version">version</a>() to discover which version your
QUuid contains. If you create instances of QUuid using the
constructor that accepts all the numeric values as parameters, use
the following table to set the four most significant bits of
parameter <tt>w2</tt>, which becomes <tt>QUuid.data3</tt> and
contains the version field in its four most significant bits.</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>msb0</th>
<th>msb1</th>
<th>msb2</th>
<th>msb3</th>
<th>Version</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>Time</td>
</tr>
<tr class="even" valign="top">
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>Embedded POSIX</td>
</tr>
<tr class="odd" valign="top">
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>Name</td>
</tr>
<tr class="even" valign="top">
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>Random</td>
</tr>
</table>
<p>The field layouts for the DCE versions listed in the table above
are specified in the <a href="http://www.ietf.org/rfc/rfc4122.txt">Network Working Group UUID
Specification</a>.</p>
<p>Most platforms provide a tool for generating new UUIDs, e.g.
<tt>uuidgen</tt> and <tt>guidgen</tt>. You can also use <a href="quuid.html#createUuid">createUuid</a>(). UUIDs generated by
<a href="quuid.html#createUuid">createUuid</a>() are of the random
type. Their <a href="quuid.html#Version-enum">QUuid.Version</a>
bits are set to <a href="quuid.html#Version-enum">QUuid.Random</a>, and their <a href="quuid.html#Variant-enum">QUuid.Variant</a> bits are set to
<a href="quuid.html#Variant-enum">QUuid.DCE</a>. The rest of the
UUID is composed of random numbers. Theoretically, this means there
is a small chance that a UUID generated by <a href="quuid.html#createUuid">createUuid</a>() will not be unique. But it
is <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier#Random_UUID_probability_of_duplicates">
a <i>very</i> small chance</a>.</p>
<p>UUIDs can be constructed from numeric values or from strings, or
using the static <a href="quuid.html#createUuid">createUuid</a>()
function. They can be converted to a string with <a href="quuid.html#toString">toString</a>(). UUIDs have a <a href="quuid.html#variant">variant</a>() and a <a href="quuid.html#version">version</a>(), and null UUIDs return true from
<a href="quuid.html#isNull">isNull</a>().</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Variant-enum" />QUuid.Variant</h3><p>This enum defines the values used in the <a href="quuid.html#variant-field">variant field</a> of the UUID. The value
in the variant field determines the layout of the 128-bit
value.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.VarUnknown</tt></td>
<td class="topAlign"><tt>-1</tt></td>
<td class="topAlign">Variant is unknown</td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.NCS</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Reserved for NCS (Network Computing System)
backward compatibility</td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.DCE</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Distributed Computing Environment, the scheme
used by <a href="quuid.html">QUuid</a></td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.Microsoft</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Reserved for Microsoft backward compatibility
(GUID)</td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.Reserved</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Reserved for future definition</td>
</tr>
</table>


<h3 class="fn"><a name="Version-enum" />QUuid.Version</h3><p>This enum defines the values used in the <a href="quuid.html#version-field">version field</a> of the UUID. The
version field is meaningful only if the value in the <a href="quuid.html#variant-field">variant field</a> is <a href="quuid.html#Variant-enum">QUuid.DCE</a>.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.VerUnknown</tt></td>
<td class="topAlign"><tt>-1</tt></td>
<td class="topAlign">Version is unknown</td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.Time</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Time-based, by using timestamp, clock
sequence, and MAC network card address (if available) for the node
sections</td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.EmbeddedPOSIX</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">DCE Security version, with embedded POSIX
UUIDs</td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.Name</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Name-based, by using values from a name for
all sections</td>
</tr>
<tr>
<td class="topAlign"><tt>QUuid.Random</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Random-based, by using random numbers for all
sections</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QUuid" />QUuid.__init__ (<i>self</i>)</h3><p>Creates the null UUID. <a href="quuid.html#toString">toString</a>() will output the null UUID as
"{00000000-0000-0000-0000-000000000000}".</p>


<h3 class="fn"><a name="QUuid-2" />QUuid.__init__ (<i>self</i>, int&#160;<i>l</i>, int&#160;<i>w1</i>, int&#160;<i>w2</i>, bytes&#160;<i>b1</i>, bytes&#160;<i>b2</i>, bytes&#160;<i>b3</i>, bytes&#160;<i>b4</i>, bytes&#160;<i>b5</i>, bytes&#160;<i>b6</i>, bytes&#160;<i>b7</i>, bytes&#160;<i>b8</i>)</h3><p>Creates a UUID with the value specified by the parameters,
<i>l</i>, <i>w1</i>, <i>w2</i>, <i>b1</i>, <i>b2</i>, <i>b3</i>,
<i>b4</i>, <i>b5</i>, <i>b6</i>, <i>b7</i>, <i>b8</i>.</p>
<p>Example:</p>
<pre class="cpp">
 <span class="comment">// {67C8770B-44F1-410A-AB9A-F9B5446F13EE}</span>
 <span class="type"><a href="quuid.html">QUuid</a></span> IID_MyInterface(<span class="number">0x67c8770b</span><span class="operator">,</span> <span class="number">0x44f1</span><span class="operator">,</span> <span class="number">0x410a</span><span class="operator">,</span> <span class="number">0xab</span><span class="operator">,</span> <span class="number">0x9a</span><span class="operator">,</span> <span class="number">0xf9</span><span class="operator">,</span> <span class="number">0xb5</span><span class="operator">,</span> <span class="number">0x44</span><span class="operator">,</span> <span class="number">0x6f</span><span class="operator">,</span> <span class="number">0x13</span><span class="operator">,</span> <span class="number">0xee</span>)
</pre>


<h3 class="fn"><a name="QUuid-3" />QUuid.__init__ (<i>self</i>, QString)</h3><p>Creates a <a href="quuid.html">QUuid</a> object from the string
<i>text</i>, which must be formatted as five hex fields separated
by '-', e.g., "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where 'x' is
a hex digit. The curly braces shown here are optional, but it is
normal to include them. If the conversion fails, a null UUID is
created. See <a href="quuid.html#toString">toString</a>() for an
explanation of how the five hex fields map to the public data
members in <a href="quuid.html">QUuid</a>.</p>
<p><b>See also</b> <a href="quuid.html#toString">toString</a>() and
<a href="quuid.html#QUuid">QUuid</a>().</p>


<h3 class="fn"><a name="QUuid-4" />QUuid.__init__ (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><h3 class="fn"><a name="QUuid-5" />QUuid.__init__ (<i>self</i>, <a href="quuid.html">QUuid</a>)</h3><p>Creates a <a href="quuid.html">QUuid</a> object from the
<a href="qbytearray.html">QByteArray</a> <i>text</i>, which must be
formatted as five hex fields separated by '-', e.g.,
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where 'x' is a hex digit.
The curly braces shown here are optional, but it is normal to
include them. If the conversion fails, a null UUID is created. See
<a href="quuid.html#toByteArray">toByteArray</a>() for an
explanation of how the five hex fields map to the public data
members in <a href="quuid.html">QUuid</a>.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also</b> <a href="quuid.html#toByteArray">toByteArray</a>() and <a href="quuid.html#QUuid">QUuid</a>().</p>


<h3 class="fn"><a name="createUuid" /><a href="quuid.html">QUuid</a> QUuid.createUuid ()</h3><p>On any platform other than Windows, this function returns a new
UUID with variant <a href="quuid.html#Variant-enum">QUuid.DCE</a>
and version <a href="quuid.html#Version-enum">QUuid.Random</a>. If
the /dev/urandom device exists, then the numbers used to construct
the UUID will be of cryptographic quality, which will make the UUID
unique. Otherwise, the numbers of the UUID will be obtained from
the local pseudo-random number generator (<a href="qtcore.html#qrand">qrand</a>(), which is seeded by <a href="qtcore.html#qsrand">qsrand</a>()) which is usually not of
cryptograhic quality, which means that the UUID can't be guaranteed
to be unique.</p>
<p>On a Windows platform, a GUID is generated, which almost
certainly <i>will</i> be unique, on this or any other system,
networked or not.</p>
<p><b>See also</b> <a href="quuid.html#variant">variant</a>() and
<a href="quuid.html#version">version</a>().</p>


<h3 class="fn"><a name="fromRfc4122" /><a href="quuid.html">QUuid</a> QUuid.fromRfc4122 (<a href="qbytearray.html">QByteArray</a>)</h3><p>Creates a <a href="quuid.html">QUuid</a> object from the binary
representation of the UUID given by <i>bytes</i>, as specified by
RFC 4122 section 4.1.2. See <a href="quuid.html#toRfc4122">toRfc4122</a>() for a further explanation of
the order of bytes required.</p>
<p>The byte array accepted is <i>not</i> a human readable
format.</p>
<p>If the conversion fails, a null UUID is created.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also</b> <a href="quuid.html#toRfc4122">toRfc4122</a>()
and <a href="quuid.html#QUuid">QUuid</a>().</p>


<h3 class="fn"><a name="isNull" />bool QUuid.isNull (<i>self</i>)</h3><p>Returns true if this is the null UUID
{00000000-0000-0000-0000-000000000000}; otherwise returns
false.</p>


<h3 class="fn"><a name="toByteArray" /><a href="qbytearray.html">QByteArray</a> QUuid.toByteArray (<i>self</i>)</h3><p>Returns the binary representation of this <a href="quuid.html">QUuid</a>. The byte array is formatted as five hex
fields separated by '-' and enclosed in curly braces, i.e.,
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where 'x' is a hex digit.
From left to right, the five hex fields are obtained from the four
public data members in <a href="quuid.html">QUuid</a> as
follows:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Field #</th>
<th>Source</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>1</td>
<td>data1</td>
</tr>
<tr class="even" valign="top">
<td>2</td>
<td>data2</td>
</tr>
<tr class="odd" valign="top">
<td>3</td>
<td>data3</td>
</tr>
<tr class="even" valign="top">
<td>4</td>
<td>data4[0] .. data4[1]</td>
</tr>
<tr class="odd" valign="top">
<td>5</td>
<td>data4[2] .. data4[7]</td>
</tr>
</table>
<p>This function was introduced in Qt 4.8.</p>


<h3 class="fn"><a name="toRfc4122" /><a href="qbytearray.html">QByteArray</a> QUuid.toRfc4122 (<i>self</i>)</h3><p>Returns the binary representation of this <a href="quuid.html">QUuid</a>. The byte array is in big endian format, and
formatted according to RFC 4122, section 4.1.2 - "Layout and byte
order".</p>
<p>The order is as follows:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Field #</th>
<th>Source</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>1</td>
<td>data1</td>
</tr>
<tr class="even" valign="top">
<td>2</td>
<td>data2</td>
</tr>
<tr class="odd" valign="top">
<td>3</td>
<td>data3</td>
</tr>
<tr class="even" valign="top">
<td>4</td>
<td>data4[0] .. data4[7]</td>
</tr>
</table>
<p>This function was introduced in Qt 4.8.</p>


<h3 class="fn"><a name="toString" />QString QUuid.toString (<i>self</i>)</h3><p>Returns the string representation of this <a href="quuid.html">QUuid</a>. The string is formatted as five hex fields
separated by '-' and enclosed in curly braces, i.e.,
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" where 'x' is a hex digit.
From left to right, the five hex fields are obtained from the four
public data members in <a href="quuid.html">QUuid</a> as
follows:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Field #</th>
<th>Source</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>1</td>
<td>data1</td>
</tr>
<tr class="even" valign="top">
<td>2</td>
<td>data2</td>
</tr>
<tr class="odd" valign="top">
<td>3</td>
<td>data3</td>
</tr>
<tr class="even" valign="top">
<td>4</td>
<td>data4[0] .. data4[1]</td>
</tr>
<tr class="odd" valign="top">
<td>5</td>
<td>data4[2] .. data4[7]</td>
</tr>
</table>


<h3 class="fn"><a name="variant" /><a href="quuid.html#Variant-enum">Variant</a> QUuid.variant (<i>self</i>)</h3><p>Returns the value in the <a href="quuid.html#variant-field">variant field</a> of the UUID. If the
return value is <a href="quuid.html#Variant-enum">QUuid.DCE</a>,
call <a href="quuid.html#version">version</a>() to see which layout
it uses. The null UUID is considered to be of an unknown
variant.</p>
<p><b>See also</b> <a href="quuid.html#version">version</a>().</p>


<h3 class="fn"><a name="version" /><a href="quuid.html#Version-enum">Version</a> QUuid.version (<i>self</i>)</h3><p>Returns the <a href="quuid.html#version-field">version field</a>
of the UUID, if the UUID's <a href="quuid.html#variant-field">variant field</a> is <a href="quuid.html#Variant-enum">QUuid.DCE</a>. Otherwise it returns
<a href="quuid.html#Version-enum">QUuid.VerUnknown</a>.</p>
<p><b>See also</b> <a href="quuid.html#variant">variant</a>().</p>


<h3 class="fn"><a name="__eq__" />bool QUuid.__eq__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>orig</i>)</h3><h3 class="fn"><a name="__ge__" />bool QUuid.__ge__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__gt__" />bool QUuid.__gt__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__le__" />bool QUuid.__le__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__lt__" />bool QUuid.__lt__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__ne__" />bool QUuid.__ne__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>orig</i>)</h3><h3 class="fn"><a name="__repr__" />object QUuid.__repr__ (<i>self</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.12.1 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.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt&#160;4.8.7</td></tr></table></div></address></body></html>