File: qurl.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 (388 lines) | stat: -rw-r--r-- 65,460 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
<?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>QUrl 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="../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">QUrl Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QUrl class provides a convenient interface for working with URLs. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qurl.html#FormattingOption-enum">FormattingOption</a></b> { None, RemoveScheme, RemovePassword, RemoveUserInfo, ..., StripTrailingSlash }</li><li><div class="fn" />class <b><a href="qurl-formattingoptions.html">FormattingOptions</a></b></li><li><div class="fn" />enum <b><a href="qurl.html#ParsingMode-enum">ParsingMode</a></b> { TolerantMode, StrictMode }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qurl.html#QUrl">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qurl.html#QUrl-2">__init__</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#QUrl-3">__init__</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" /><b><a href="qurl.html#QUrl-4">__init__</a></b> (<i>self</i>, QString, ParsingMode)</li><li><div class="fn" /><b><a href="qurl.html#addEncodedQueryItem">addEncodedQueryItem</a></b> (<i>self</i>, QByteArray, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#addQueryItem">addQueryItem</a></b> (<i>self</i>, QString, QString)</li><li><div class="fn" />list-of-QByteArray <b><a href="qurl.html#allEncodedQueryItemValues">allEncodedQueryItemValues</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" />QStringList <b><a href="qurl.html#allQueryItemValues">allQueryItemValues</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QString <b><a href="qurl.html#authority">authority</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qurl.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qurl.html#detach">detach</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#encodedFragment">encodedFragment</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#encodedHost">encodedHost</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#encodedPassword">encodedPassword</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#encodedPath">encodedPath</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#encodedQuery">encodedQuery</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-tuple-of-QByteArray-QByteArray <b><a href="qurl.html#encodedQueryItems">encodedQueryItems</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#encodedQueryItemValue">encodedQueryItemValue</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#encodedUserName">encodedUserName</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qurl.html#errorString">errorString</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qurl.html#fragment">fragment</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#hasEncodedQueryItem">hasEncodedQueryItem</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" />bool <b><a href="qurl.html#hasFragment">hasFragment</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#hasQuery">hasQuery</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#hasQueryItem">hasQueryItem</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QString <b><a href="qurl.html#host">host</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#isDetached">isDetached</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#isEmpty">isEmpty</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#isParentOf">isParentOf</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />bool <b><a href="qurl.html#isRelative">isRelative</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qurl.html#password">password</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qurl.html#path">path</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qurl.html#port">port</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qurl.html#port-2">port</a></b> (<i>self</i>, int)</li><li><div class="fn" />list-of-tuple-of-QString-QString <b><a href="qurl.html#queryItems">queryItems</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qurl.html#queryItemValue">queryItemValue</a></b> (<i>self</i>, QString)</li><li><div class="fn" />str <b><a href="qurl.html#queryPairDelimiter">queryPairDelimiter</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qurl.html#queryValueDelimiter">queryValueDelimiter</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qurl.html#removeAllEncodedQueryItems">removeAllEncodedQueryItems</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#removeAllQueryItems">removeAllQueryItems</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#removeEncodedQueryItem">removeEncodedQueryItem</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#removeQueryItem">removeQueryItem</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QUrl <b><a href="qurl.html#resolved">resolved</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />QString <b><a href="qurl.html#scheme">scheme</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qurl.html#setAuthority">setAuthority</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedFragment">setEncodedFragment</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedHost">setEncodedHost</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedPassword">setEncodedPassword</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedPath">setEncodedPath</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedQuery">setEncodedQuery</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedQueryItems">setEncodedQueryItems</a></b> (<i>self</i>, list-of-tuple-of-QByteArray-QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedUrl">setEncodedUrl</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedUrl-2">setEncodedUrl</a></b> (<i>self</i>, QByteArray, ParsingMode)</li><li><div class="fn" /><b><a href="qurl.html#setEncodedUserName">setEncodedUserName</a></b> (<i>self</i>, QByteArray)</li><li><div class="fn" /><b><a href="qurl.html#setFragment">setFragment</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setHost">setHost</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setPassword">setPassword</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setPath">setPath</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setPort">setPort</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qurl.html#setQueryDelimiters">setQueryDelimiters</a></b> (<i>self</i>, str, str)</li><li><div class="fn" /><b><a href="qurl.html#setQueryItems">setQueryItems</a></b> (<i>self</i>, list-of-tuple-of-QString-QString)</li><li><div class="fn" /><b><a href="qurl.html#setScheme">setScheme</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setUrl">setUrl</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setUrl-2">setUrl</a></b> (<i>self</i>, QString, ParsingMode)</li><li><div class="fn" /><b><a href="qurl.html#setUserInfo">setUserInfo</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qurl.html#setUserName">setUserName</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#toEncoded">toEncoded</a></b> (<i>self</i>, FormattingOptions&#160;<i>options</i>&#160;=&#160;QUrl.None)</li><li><div class="fn" />QString <b><a href="qurl.html#toLocalFile">toLocalFile</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qurl.html#toString">toString</a></b> (<i>self</i>, FormattingOptions&#160;<i>options</i>&#160;=&#160;QUrl.None)</li><li><div class="fn" />QString <b><a href="qurl.html#userInfo">userInfo</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qurl.html#userName">userName</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QString <b><a href="qurl.html#fromAce">fromAce</a></b> (QByteArray)</li><li><div class="fn" />QUrl <b><a href="qurl.html#fromEncoded">fromEncoded</a></b> (QByteArray)</li><li><div class="fn" />QUrl <b><a href="qurl.html#fromEncoded-2">fromEncoded</a></b> (QByteArray, ParsingMode)</li><li><div class="fn" />QUrl <b><a href="qurl.html#fromLocalFile">fromLocalFile</a></b> (QString)</li><li><div class="fn" />QString <b><a href="qurl.html#fromPercentEncoding">fromPercentEncoding</a></b> (QByteArray)</li><li><div class="fn" />QString <b><a href="qurl.html#fromPunycode">fromPunycode</a></b> (QByteArray)</li><li><div class="fn" />QUrl <b><a href="qurl.html#fromUserInput">fromUserInput</a></b> (QString)</li><li><div class="fn" />QStringList <b><a href="qurl.html#idnWhitelist">idnWhitelist</a></b> ()</li><li><div class="fn" /><b><a href="qurl.html#setIdnWhitelist">setIdnWhitelist</a></b> (QStringList)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#toAce">toAce</a></b> (QString)</li><li><div class="fn" />QByteArray <b><a href="qurl.html#toPercentEncoding">toPercentEncoding</a></b> (QString, QByteArray&#160;<i>exclude</i>&#160;=&#160;QByteArray(), QByteArray&#160;<i>include</i>&#160;=&#160;QByteArray())</li><li><div class="fn" />QByteArray <b><a href="qurl.html#toPunycode">toPunycode</a></b> (QString)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qurl.html#__eq__">__eq__</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />bool <b><a href="qurl.html#__ge__">__ge__</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />int <b><a href="qurl.html#__hash__">__hash__</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qurl.html#__lt__">__lt__</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />bool <b><a href="qurl.html#__ne__">__ne__</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />str <b><a href="qurl.html#__repr__">__repr__</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QUrl class provides a convenient interface for working with URLs.</p>
<p>It can parse and construct URLs in both encoded and unencoded form. QUrl also has support for internationalized domain names (IDNs).</p>
<p>The most common way to use QUrl is to initialize it via the constructor by passing a <a href="qstring.html">QString</a>. Otherwise, <a href="qurl.html#setUrl">setUrl</a>() and <a href="qurl.html#setEncodedUrl">setEncodedUrl</a>() can also be used.</p>
<p>URLs can be represented in two forms: encoded or unencoded. The unencoded representation is suitable for showing to users, but the encoded representation is typically what you would send to a web server. For example, the unencoded URL &quot;http://b&#252;<tt />hler.example.com" would be sent to the server as "http://xn--bhler-kva.example.com/List%20of%20applicants.xml".</p>
<p>A URL can also be constructed piece by piece by calling <a href="qurl.html#setScheme">setScheme</a>(), <a href="qurl.html#setUserName">setUserName</a>(), <a href="qurl.html#setPassword">setPassword</a>(), <a href="qurl.html#setHost">setHost</a>(), <a href="qurl.html#setPort">setPort</a>(), <a href="qurl.html#setPath">setPath</a>(), <a href="qurl.html#setEncodedQuery">setEncodedQuery</a>() and <a href="qurl.html#setFragment">setFragment</a>(). Some convenience functions are also available: <a href="qurl.html#setAuthority">setAuthority</a>() sets the user name, password, host and port. <a href="qurl.html#setUserInfo">setUserInfo</a>() sets the user name and password at once.</p>
<p>Call <a href="qurl.html#isValid">isValid</a>() to check if the URL is valid. This can be done at any point during the constructing of a URL.</p>
<p>Constructing a query is particularly convenient through the use of <a href="qurl.html#setQueryItems">setQueryItems</a>(), <a href="qurl.html#addQueryItem">addQueryItem</a>() and <a href="qurl.html#removeQueryItem">removeQueryItem</a>(). Use <a href="qurl.html#setQueryDelimiters">setQueryDelimiters</a>() to customize the delimiters used for generating the query string.</p>
<p>For the convenience of generating encoded URL strings or query strings, there are two static functions called <a href="qurl.html#fromPercentEncoding">fromPercentEncoding</a>() and <a href="qurl.html#toPercentEncoding">toPercentEncoding</a>() which deal with percent encoding and decoding of QStrings.</p>
<p>Calling <a href="qurl.html#isRelative">isRelative</a>() will tell whether or not the URL is relative. A relative URL can be resolved by passing it as argument to <a href="qurl.html#resolved">resolved</a>(), which returns an absolute URL. <a href="qurl.html#isParentOf">isParentOf</a>() is used for determining whether one URL is a parent of another.</p>
<p><a href="qurl.html#fromLocalFile">fromLocalFile</a>() constructs a QUrl by parsing a local file path. <a href="qurl.html#toLocalFile">toLocalFile</a>() converts a URL to a local file path.</p>
<p>The human readable representation of the URL is fetched with <a href="qurl.html#toString">toString</a>(). This representation is appropriate for displaying a URL to a user in unencoded form. The encoded form however, as returned by <a href="qurl.html#toEncoded">toEncoded</a>(), is for internal use, passing to web servers, mail clients and so on.</p>
<p>QUrl conforms to the URI specification from <a href="http://www.rfc-editor.org/rfc/rfc3986.txt">RFC 3986</a> (Uniform Resource Identifier: Generic Syntax), and includes scheme extensions from <a href="http://www.rfc-editor.org/rfc/rfc1738.txt">RFC 1738</a> (Uniform Resource Locators). Case folding rules in QUrl conform to <a href="http://www.rfc-editor.org/rfc/rfc3491.txt">RFC 3491</a> (Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)).</p>
<p>See also <a href="qurlinfo.html">QUrlInfo</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="FormattingOption-enum" />QUrl.FormattingOption</h3><p>The formatting options define how the URL is formatted when written out as text.</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>QUrl.None</tt></td><td align="center" valign="top"><tt>0x0</tt></td><td valign="top">The format of the URL is unchanged.</td></tr>
<tr><td valign="top"><tt>QUrl.RemoveScheme</tt></td><td align="center" valign="top"><tt>0x1</tt></td><td valign="top">The scheme is removed from the URL.</td></tr>
<tr><td valign="top"><tt>QUrl.RemovePassword</tt></td><td align="center" valign="top"><tt>0x2</tt></td><td valign="top">Any password in the URL is removed.</td></tr>
<tr><td valign="top"><tt>QUrl.RemoveUserInfo</tt></td><td align="center" valign="top"><tt>RemovePassword | 0x4</tt></td><td valign="top">Any user information in the URL is removed.</td></tr>
<tr><td valign="top"><tt>QUrl.RemovePort</tt></td><td align="center" valign="top"><tt>0x8</tt></td><td valign="top">Any specified port is removed from the URL.</td></tr>
<tr><td valign="top"><tt>QUrl.RemoveAuthority</tt></td><td align="center" valign="top"><tt>RemoveUserInfo | RemovePort | 0x10</tt></td><td valign="top">&#160;</td></tr>
<tr><td valign="top"><tt>QUrl.RemovePath</tt></td><td align="center" valign="top"><tt>0x20</tt></td><td valign="top">The URL's path is removed, leaving only the scheme, host address, and port (if present).</td></tr>
<tr><td valign="top"><tt>QUrl.RemoveQuery</tt></td><td align="center" valign="top"><tt>0x40</tt></td><td valign="top">The query part of the URL (following a '?' character) is removed.</td></tr>
<tr><td valign="top"><tt>QUrl.RemoveFragment</tt></td><td align="center" valign="top"><tt>0x80</tt></td><td valign="top">&#160;</td></tr>
<tr><td valign="top"><tt>QUrl.StripTrailingSlash</tt></td><td align="center" valign="top"><tt>0x10000</tt></td><td valign="top">The trailing slash is removed if one is present.</td></tr>
</table></p>
<p>Note that the case folding rules in <a href="http://www.rfc-editor.org/rfc/rfc3491.txt">Nameprep</a>, which <a href="qurl.html">QUrl</a> conforms to, require host names to always be converted to lower case, regardless of the Qt.FormattingOptions used.</p>
<p>The FormattingOptions type is a typedef for <a href="qflags.html">QFlags</a>&lt;FormattingOption&gt;. It stores an OR combination of FormattingOption values.</p>
<a name="//apple_ref/cpp/tag/QUrl/ParsingMode" />
<a name="//apple_ref/cpp/econst/QUrl/TolerantMode" />
<a name="//apple_ref/cpp/econst/QUrl/StrictMode" />
<h3 class="fn"><a name="ParsingMode-enum" />QUrl.ParsingMode</h3><p>The parsing mode controls the way <a href="qurl.html">QUrl</a> parses strings.</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>QUrl.TolerantMode</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top"><a href="qurl.html">QUrl</a> will try to correct some common errors in URLs. This mode is useful when processing URLs entered by users.</td></tr>
<tr><td valign="top"><tt>QUrl.StrictMode</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Only valid URLs are accepted. This mode is useful for general URL validation.</td></tr>
</table></p>
<p>In TolerantMode, the parser corrects the following invalid input:</p>
<ul>
<li>Spaces and "%20": If an encoded URL contains a space, this will be replaced with "%20". If a decoded URL contains "%20", this will be replaced with a single space before the URL is parsed.</li>
<li>Single "%" characters: Any occurrences of a percent character "%" not followed by exactly two hexadecimal characters (e.g., "13% coverage.html") will be replaced by "%25".</li>
<li>Reserved and unreserved characters: An encoded URL should only contain a few characters as literals; all other characters should be percent-encoded. In TolerantMode, these characters will be automatically percent-encoded where they are not allowed: space / double-quote / "&lt;" / "&gt;" / "[" / "" / "]" / "^" / "`" / "{" / "|" / "}"</li>
</ul>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QUrl" />QUrl.__init__ (<i>self</i>)</h3><p>Constructs an empty <a href="qurl.html">QUrl</a> object.</p>
<h3 class="fn"><a name="QUrl-2" />QUrl.__init__ (<i>self</i>, QString)</h3><p>Constructs a URL by parsing <i>url</i>. <i>url</i> is assumed to be in human readable representation, with no percent encoding. <a href="qurl.html">QUrl</a> will automatically percent encode all characters that are not allowed in a URL.</p>
<p>Example:</p>
<pre> QUrl url("http:<span class="comment">//www.example.com/List of holidays.xml");</span>
<span class="comment"> // url.toEncoded() == "http://www.example.com/List%20of%20holidays.xml"</span></pre>
<p>To construct a URL from an encoded string, call <a href="qurl.html#fromEncoded">fromEncoded</a>():</p>
<pre> QUrl url = QUrl.fromEncoded("http:<span class="comment">//qt.nokia.com/List%20of%20holidays.xml");</span></pre>
<p>See also <a href="qurl.html#setUrl">setUrl</a>(), <a href="qurl.html#setEncodedUrl">setEncodedUrl</a>(), <a href="qurl.html#fromEncoded">fromEncoded</a>(), and <a href="qurl.html#ParsingMode-enum">TolerantMode</a>.</p>
<h3 class="fn"><a name="QUrl-3" />QUrl.__init__ (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>Constructs a copy of <i>other</i>.</p>
<h3 class="fn"><a name="QUrl-4" />QUrl.__init__ (<i>self</i>, QString, <a href="qurl.html#ParsingMode-enum">ParsingMode</a>)</h3><p>This is an overloaded function.</p>
<p>Parses the <i>url</i> using the parser mode <i>parsingMode</i>.</p>
<p>See also <a href="qurl.html#setUrl">setUrl</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/~QUrl" />
<h3 class="fn"><a name="addEncodedQueryItem" />QUrl.addEncodedQueryItem (<i>self</i>, <a href="qbytearray.html">QByteArray</a>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Inserts the pair <i>key</i> = <i>value</i> into the query string of the URL.</p>
<p>Note: this function does not verify that either <i>key</i> or <i>value</i> are properly encoded. It is the caller's responsibility to ensure that the query delimiters are properly encoded, if any.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#addQueryItem">addQueryItem</a>() and <a href="qurl.html#setQueryDelimiters">setQueryDelimiters</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/addQueryItem" />
<h3 class="fn"><a name="addQueryItem" />QUrl.addQueryItem (<i>self</i>, QString, QString)</h3><p>Inserts the pair <i>key</i> = <i>value</i> into the query string of the URL.</p>
<p>The key/value pair is encoded before it is added to the query. The pair is converted into separate strings internally. The <i>key</i> and <i>value</i> is first encoded into UTF-8 and then delimited by the character returned by valueDelimiter(). Each key/value pair is delimited by the character returned by pairDelimiter().</p>
<p>See also <a href="qurl.html#addEncodedQueryItem">addEncodedQueryItem</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/allEncodedQueryItemValues" />
<h3 class="fn"><a name="allEncodedQueryItemValues" />list-of-QByteArray QUrl.allEncodedQueryItemValues (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Returns the a list of query string values whose key is equal to <i>key</i> from the URL.</p>
<p>Note: if the encoded <i>key</i> does not match the encoded version of the query, this function will not work. That is, if the encoded query of this URL is "search=Qt%20Rules", calling this function with <i>key</i> = "%73earch" will return an empty list.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#allQueryItemValues">allQueryItemValues</a>(), <a href="qurl.html#queryItemValue">queryItemValue</a>(), and <a href="qurl.html#encodedQueryItemValue">encodedQueryItemValue</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/allQueryItemValues" />
<h3 class="fn"><a name="allQueryItemValues" />QStringList QUrl.allQueryItemValues (<i>self</i>, QString)</h3><p>Returns the a list of query string values whose key is equal to <i>key</i> from the URL.</p>
<p>See also <a href="qurl.html#queryItemValue">queryItemValue</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/authority" />
<h3 class="fn"><a name="authority" />QString QUrl.authority (<i>self</i>)</h3><p>Returns the authority of the URL if it is defined; otherwise an empty string is returned.</p>
<p>See also <a href="qurl.html#setAuthority">setAuthority</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/clear" />
<h3 class="fn"><a name="clear" />QUrl.clear (<i>self</i>)</h3><p>Resets the content of the <a href="qurl.html">QUrl</a>. After calling this function, the <a href="qurl.html">QUrl</a> is equal to one that has been constructed with the default empty constructor.</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedFragment" />
<h3 class="fn"><a name="detach" />QUrl.detach (<i>self</i>)</h3><h3 class="fn"><a name="encodedFragment" /><a href="qbytearray.html">QByteArray</a> QUrl.encodedFragment (<i>self</i>)</h3><p>Returns the fragment of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setEncodedFragment">setEncodedFragment</a>() and <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedHost" />
<h3 class="fn"><a name="encodedHost" /><a href="qbytearray.html">QByteArray</a> QUrl.encodedHost (<i>self</i>)</h3><p>Returns the host part of the URL if it is defined; otherwise an empty string is returned.</p>
<p>Note: encodedHost() does not return percent-encoded hostnames. Instead, the ACE-encoded (bare ASCII in Punycode encoding) form will be returned for any non-ASCII hostname.</p>
<p>This function is equivalent to calling <a href="qurl.html#toAce">QUrl.toAce</a>() on the return value of <a href="qurl.html#host">host</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setEncodedHost">setEncodedHost</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedPassword" />
<h3 class="fn"><a name="encodedPassword" /><a href="qbytearray.html">QByteArray</a> QUrl.encodedPassword (<i>self</i>)</h3><p>Returns the password of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setEncodedPassword">setEncodedPassword</a>() and <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedPath" />
<h3 class="fn"><a name="encodedPath" /><a href="qbytearray.html">QByteArray</a> QUrl.encodedPath (<i>self</i>)</h3><p>Returns the path of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setEncodedPath">setEncodedPath</a>() and <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedQuery" />
<h3 class="fn"><a name="encodedQuery" /><a href="qbytearray.html">QByteArray</a> QUrl.encodedQuery (<i>self</i>)</h3><p>Returns the query string of the URL in percent encoded form.</p>
<p>See also <a href="qurl.html#setEncodedQuery">setEncodedQuery</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedQueryItemValue" />
<h3 class="fn"><a name="encodedQueryItems" />list-of-tuple-of-QByteArray-QByteArray QUrl.encodedQueryItems (<i>self</i>)</h3><p>Returns the query string of the URL, as a map of encoded keys and values.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setEncodedQueryItems">setEncodedQueryItems</a>(), <a href="qurl.html#setQueryItems">setQueryItems</a>(), and <a href="qurl.html#setEncodedQuery">setEncodedQuery</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedUserName" />
<h3 class="fn"><a name="encodedQueryItemValue" /><a href="qbytearray.html">QByteArray</a> QUrl.encodedQueryItemValue (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Returns the first query string value whose key is equal to <i>key</i> from the URL.</p>
<p>Note: if the encoded <i>key</i> does not match the encoded version of the query, this function will not work. That is, if the encoded query of this URL is "search=Qt%20Rules", calling this function with <i>key</i> = "%73earch" will return an empty string.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#queryItemValue">queryItemValue</a>() and <a href="qurl.html#allQueryItemValues">allQueryItemValues</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/encodedQueryItems" />
<h3 class="fn"><a name="encodedUserName" /><a href="qbytearray.html">QByteArray</a> QUrl.encodedUserName (<i>self</i>)</h3><p>Returns the user name of the URL if it is defined; otherwise an empty string is returned. The returned value will have its non-ASCII and other control characters percent-encoded, as in <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setEncodedUserName">setEncodedUserName</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/errorString" />
<h3 class="fn"><a name="errorString" />QString QUrl.errorString (<i>self</i>)</h3><p>Returns a text string that explains why an URL is invalid in the case being; otherwise returns an empty string.</p>
<p>This function was introduced in Qt 4.2.</p>
<a name="//apple_ref/cpp/instm/QUrl/fragment" />
<h3 class="fn"><a name="fragment" />QString QUrl.fragment (<i>self</i>)</h3><p>Returns the fragment of the URL.</p>
<p>See also <a href="qurl.html#setFragment">setFragment</a>().</p>
<a name="//apple_ref/cpp/clm/QUrl/fromAce" />
<h3 class="fn"><a name="fromAce" />QString QUrl.fromAce (<a href="qbytearray.html">QByteArray</a>)</h3><p>Returns the Unicode form of the given domain name <i>domain</i>, which is encoded in the ASCII Compatible Encoding (ACE). The result of this function is considered equivalent to <i>domain</i>.</p>
<p>If the value in <i>domain</i> cannot be encoded, it will be converted to <a href="qstring.html">QString</a> and returned.</p>
<p>The ASCII Compatible Encoding (ACE) is defined by RFC 3490, RFC 3491 and RFC 3492. It is part of the Internationalizing Domain Names in Applications (IDNA) specification, which allows for domain names (like <tt>"example.com"</tt>) to be written using international characters.</p>
<p>This function was introduced in Qt 4.2.</p>
<a name="//apple_ref/cpp/clm/QUrl/fromEncoded" />
<h3 class="fn"><a name="fromEncoded" /><a href="qurl.html">QUrl</a> QUrl.fromEncoded (<a href="qbytearray.html">QByteArray</a>)</h3><p>Parses <i>input</i> and returns the corresponding <a href="qurl.html">QUrl</a>. <i>input</i> is assumed to be in encoded form, containing only ASCII characters.</p>
<p>The URL is parsed using <a href="qurl.html#ParsingMode-enum">TolerantMode</a>.</p>
<p>See also <a href="qurl.html#toEncoded">toEncoded</a>() and <a href="qurl.html#setUrl">setUrl</a>().</p>
<h3 class="fn"><a name="fromEncoded-2" /><a href="qurl.html">QUrl</a> QUrl.fromEncoded (<a href="qbytearray.html">QByteArray</a>, <a href="qurl.html#ParsingMode-enum">ParsingMode</a>)</h3><p>This is an overloaded function.</p>
<p>Parses the URL using <i>parsingMode</i>.</p>
<p>See also <a href="qurl.html#toEncoded">toEncoded</a>() and <a href="qurl.html#setUrl">setUrl</a>().</p>
<a name="//apple_ref/cpp/clm/QUrl/fromLocalFile" />
<h3 class="fn"><a name="fromLocalFile" /><a href="qurl.html">QUrl</a> QUrl.fromLocalFile (QString)</h3><p>Returns a <a href="qurl.html">QUrl</a> representation of <i>localFile</i>, interpreted as a local file.</p>
<p>See also <a href="qurl.html#toLocalFile">toLocalFile</a>().</p>
<a name="//apple_ref/cpp/clm/QUrl/fromPercentEncoding" />
<h3 class="fn"><a name="fromPercentEncoding" />QString QUrl.fromPercentEncoding (<a href="qbytearray.html">QByteArray</a>)</h3><p>Returns a decoded copy of <i>input</i>. <i>input</i> is first decoded from percent encoding, then converted from UTF-8 to unicode.</p>
<a name="//apple_ref/cpp/clm/QUrl/fromUserInput" />
<h3 class="fn"><a name="fromPunycode" />QString QUrl.fromPunycode (<a href="qbytearray.html">QByteArray</a>)</h3><h3 class="fn"><a name="fromUserInput" /><a href="qurl.html">QUrl</a> QUrl.fromUserInput (QString)</h3><p>Returns a valid URL from a user supplied <i>userInput</i> string if one can be deducted. In the case that is not possible, an invalid <a href="qurl.html#QUrl">QUrl</a>() is returned.</p>
<p>Most applications that can browse the web, allow the user to input a URL in the form of a plain string. This string can be manually typed into a location bar, obtained from the clipboard, or passed in via command line arguments.</p>
<p>When the string is not already a valid URL, a best guess is performed, making various web related assumptions.</p>
<p>In the case the string corresponds to a valid file path on the system, a file:// URL is constructed, using <a href="qurl.html#fromLocalFile">QUrl.fromLocalFile</a>().</p>
<p>If that is not the case, an attempt is made to turn the string into a http:// or ftp:// URL. The latter in the case the string starts with 'ftp'. The result is then passed through <a href="qurl.html">QUrl</a>'s tolerant parser, and in the case or success, a valid <a href="qurl.html">QUrl</a> is returned, or else a <a href="qurl.html#QUrl">QUrl</a>().</p>
<a name="examples" />
<h4>Examples:</h4>
<ul>
<li>qt.nokia.com becomes http://qt.nokia.com</li>
<li>ftp.qt.nokia.com becomes ftp://ftp.qt.nokia.com</li>
<li>hostname becomes http://hostname</li>
<li>/home/user/test.html becomes file:///home/user/test.html</li>
</ul>
<a name="tips-to-avoid-erroneous-character-conversion-when-dealing-with" />
<h5>Tips to avoid erroneous character conversion when dealing with</h5>
<p>URLs and strings:</p>
<ul>
<li>When creating an URL <a href="qstring.html">QString</a> from a <a href="qbytearray.html">QByteArray</a> or a char*, always use <a href="qstring.html#fromUtf8">QString.fromUtf8</a>().</li>
<li>Favor the use of <a href="qurl.html#fromEncoded">QUrl.fromEncoded</a>() and <a href="qurl.html#toEncoded">QUrl.toEncoded</a>() instead of <a href="qurl.html">QUrl</a>(string) and <a href="qurl.html#toString">QUrl.toString</a>() when converting <a href="qurl.html">QUrl</a> to/from string.</li>
</ul>
<p>This function was introduced in Qt 4.6.</p>
<a name="//apple_ref/cpp/instm/QUrl/hasEncodedQueryItem" />
<h3 class="fn"><a name="hasEncodedQueryItem" />bool QUrl.hasEncodedQueryItem (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Returns true if there is a query string pair whose key is equal to <i>key</i> from the URL.</p>
<p>Note: if the encoded <i>key</i> does not match the encoded version of the query, this function will return false. That is, if the encoded query of this URL is "search=Qt%20Rules", calling this function with <i>key</i> = "%73earch" will return false.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#hasQueryItem">hasQueryItem</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/hasFragment" />
<h3 class="fn"><a name="hasFragment" />bool QUrl.hasFragment (<i>self</i>)</h3><p>Returns true if this URL contains a fragment (i.e., if # was seen on it).</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qurl.html#fragment">fragment</a>() and <a href="qurl.html#setFragment">setFragment</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/hasQuery" />
<h3 class="fn"><a name="hasQuery" />bool QUrl.hasQuery (<i>self</i>)</h3><p>Returns true if this URL contains a Query (i.e., if ? was seen on it).</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qurl.html#hasQueryItem">hasQueryItem</a>() and <a href="qurl.html#encodedQuery">encodedQuery</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/hasQueryItem" />
<h3 class="fn"><a name="hasQueryItem" />bool QUrl.hasQueryItem (<i>self</i>, QString)</h3><p>Returns true if there is a query string pair whose key is equal to <i>key</i> from the URL.</p>
<p>See also <a href="qurl.html#hasEncodedQueryItem">hasEncodedQueryItem</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/host" />
<h3 class="fn"><a name="host" />QString QUrl.host (<i>self</i>)</h3><p>Returns the host of the URL if it is defined; otherwise an empty string is returned.</p>
<p>See also <a href="qurl.html#setHost">setHost</a>().</p>
<a name="//apple_ref/cpp/clm/QUrl/idnWhitelist" />
<h3 class="fn"><a name="idnWhitelist" />QStringList QUrl.idnWhitelist ()</h3><p>Returns the current whitelist of top-level domains that are allowed to have non-ASCII characters in their compositions.</p>
<p>See <a href="qurl.html#setIdnWhitelist">setIdnWhitelist</a>() for the rationale of this list.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qurl.html#setIdnWhitelist">setIdnWhitelist</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/isEmpty" />
<h3 class="fn"><a name="isDetached" />bool QUrl.isDetached (<i>self</i>)</h3><h3 class="fn"><a name="isEmpty" />bool QUrl.isEmpty (<i>self</i>)</h3><p>Returns true if the URL has no data; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QUrl/isParentOf" />
<h3 class="fn"><a name="isParentOf" />bool QUrl.isParentOf (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>Returns true if this URL is a parent of <i>childUrl</i>. <i>childUrl</i> is a child of this URL if the two URLs share the same scheme and authority, and this URL's path is a parent of the path of <i>childUrl</i>.</p>
<a name="//apple_ref/cpp/instm/QUrl/isRelative" />
<h3 class="fn"><a name="isRelative" />bool QUrl.isRelative (<i>self</i>)</h3><p>Returns true if the URL is relative; otherwise returns false. A URL is relative if its scheme is undefined; this function is therefore equivalent to calling <a href="qurl.html#scheme">scheme</a>().<a href="qurl.html#isEmpty">isEmpty</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/isValid" />
<h3 class="fn"><a name="isValid" />bool QUrl.isValid (<i>self</i>)</h3><p>Returns true if the URL is valid; otherwise returns false.</p>
<p>The URL is run through a conformance test. Every part of the URL must conform to the standard encoding rules of the URI standard for the URL to be reported as valid.</p>
<pre> bool checkUrl(const QUrl &amp;url) {
     if (!url.isValid()) {
         qDebug(QString("Invalid URL: %1").arg(url.toString()));
         return false;
     }

     return true;
 }</pre>
<a name="//apple_ref/cpp/instm/QUrl/password" />
<h3 class="fn"><a name="password" />QString QUrl.password (<i>self</i>)</h3><p>Returns the password of the URL if it is defined; otherwise an empty string is returned.</p>
<p>See also <a href="qurl.html#setPassword">setPassword</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/path" />
<h3 class="fn"><a name="path" />QString QUrl.path (<i>self</i>)</h3><h3 class="fn"><a name="port" />int QUrl.port (<i>self</i>)</h3><p>Returns the port of the URL, or -1 if the port is unspecified.</p>
<p>See also <a href="qurl.html#setPort">setPort</a>().</p>
<h3 class="fn"><a name="port-2" />int QUrl.port (<i>self</i>, int)</h3><p>This is an overloaded function.</p>
<p>Returns the port of the URL, or <i>defaultPort</i> if the port is unspecified.</p>
<p>Example:</p>
<pre> QFtp ftp;
 ftp.connectToHost(url.host(), url.port(21));</pre>
<p>This function was introduced in Qt 4.1.</p>
<a name="//apple_ref/cpp/instm/QUrl/queryItemValue" />
<h3 class="fn"><a name="queryItems" />list-of-tuple-of-QString-QString QUrl.queryItems (<i>self</i>)</h3><p>Returns the query string of the URL, as a map of keys and values.</p>
<p>See also <a href="qurl.html#setQueryItems">setQueryItems</a>() and <a href="qurl.html#setEncodedQuery">setEncodedQuery</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/queryPairDelimiter" />
<h3 class="fn"><a name="queryItemValue" />QString QUrl.queryItemValue (<i>self</i>, QString)</h3><p>Returns the first query string value whose key is equal to <i>key</i> from the URL.</p>
<p>See also <a href="qurl.html#allQueryItemValues">allQueryItemValues</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/queryItems" />
<h3 class="fn"><a name="queryPairDelimiter" />str QUrl.queryPairDelimiter (<i>self</i>)</h3><p>Returns the character used to delimit between key-value pairs in the query string of the URL.</p>
<a name="//apple_ref/cpp/instm/QUrl/queryValueDelimiter" />
<h3 class="fn"><a name="queryValueDelimiter" />str QUrl.queryValueDelimiter (<i>self</i>)</h3><p>Returns the character used to delimit between keys and values in the query string of the URL.</p>
<a name="//apple_ref/cpp/instm/QUrl/removeAllEncodedQueryItems" />
<h3 class="fn"><a name="removeAllEncodedQueryItems" />QUrl.removeAllEncodedQueryItems (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Removes all the query string pairs whose key is equal to <i>key</i> from the URL.</p>
<p>Note: if the encoded <i>key</i> does not match the encoded version of the query, this function will not work. That is, if the encoded query of this URL is "search=Qt%20Rules", calling this function with <i>key</i> = "%73earch" will do nothing.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#removeQueryItem">removeQueryItem</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/removeAllQueryItems" />
<h3 class="fn"><a name="removeAllQueryItems" />QUrl.removeAllQueryItems (<i>self</i>, QString)</h3><p>Removes all the query string pairs whose key is equal to <i>key</i> from the URL.</p>
<p>See also <a href="qurl.html#removeQueryItem">removeQueryItem</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/removeEncodedQueryItem" />
<h3 class="fn"><a name="removeEncodedQueryItem" />QUrl.removeEncodedQueryItem (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Removes the first query string pair whose key is equal to <i>key</i> from the URL.</p>
<p>Note: if the encoded <i>key</i> does not match the encoded version of the query, this function will not work. That is, if the encoded query of this URL is "search=Qt%20Rules", calling this function with <i>key</i> = "%73earch" will do nothing.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#removeQueryItem">removeQueryItem</a>() and <a href="qurl.html#removeAllQueryItems">removeAllQueryItems</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/removeQueryItem" />
<h3 class="fn"><a name="removeQueryItem" />QUrl.removeQueryItem (<i>self</i>, QString)</h3><p>Removes the first query string pair whose key is equal to <i>key</i> from the URL.</p>
<p>See also <a href="qurl.html#removeAllQueryItems">removeAllQueryItems</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/resolved" />
<h3 class="fn"><a name="resolved" /><a href="qurl.html">QUrl</a> QUrl.resolved (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>Returns the result of the merge of this URL with <i>relative</i>. This URL is used as a base to convert <i>relative</i> to an absolute URL.</p>
<p>If <i>relative</i> is not a relative URL, this function will return <i>relative</i> directly. Otherwise, the paths of the two URLs are merged, and the new URL returned has the scheme and authority of the base URL, but with the merged path, as in the following example:</p>
<pre> QUrl baseUrl("http:<span class="comment">//qt.nokia.com/support");</span>
 QUrl relativeUrl("../products/solutions");
 qDebug(baseUrl.resolved(relativeUrl).toString());
<span class="comment"> // prints "http://qt.nokia.com/products/solutions"</span></pre>
<p>Calling resolved() with ".." returns a <a href="qurl.html">QUrl</a> whose directory is one level higher than the original. Similarly, calling resolved() with "../.." removes two levels from the path. If <i>relative</i> is "/", the path becomes "/".</p>
<p>See also <a href="qurl.html#isRelative">isRelative</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/scheme" />
<h3 class="fn"><a name="scheme" />QString QUrl.scheme (<i>self</i>)</h3><p>Returns the scheme of the URL. If an empty string is returned, this means the scheme is undefined and the URL is then relative.</p>
<p>See also <a href="qurl.html#setScheme">setScheme</a>() and <a href="qurl.html#isRelative">isRelative</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setAuthority" />
<h3 class="fn"><a name="setAuthority" />QUrl.setAuthority (<i>self</i>, QString)</h3><p>Sets the authority of the URL to <i>authority</i>.</p>
<p>The authority of a URL is the combination of user info, a host name and a port. All of these elements are optional; an empty authority is therefore valid.</p>
<p>The user info and host are separated by a '<a href="examples-overview.html">@</a>', and the host and port are separated by a ':'. If the user info is empty, the '<a href="examples-overview.html">@</a>' must be omitted; although a stray ':' is permitted if the port is empty.</p>
<p>The following example shows a valid authority string:</p>
<p align="center"><img src="images/qurl-authority.png" /></p><p>See also <a href="qurl.html#authority">authority</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedFragment" />
<h3 class="fn"><a name="setEncodedFragment" />QUrl.setEncodedFragment (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Sets the URL's fragment to the percent-encoded <i>fragment</i>. The fragment is the last part of the URL, represented by a '#' followed by a string of characters. It is typically used in HTTP for referring to a certain link or point on a page:</p>
<p align="center"><img src="images/qurl-fragment.png" /></p><p>The fragment is sometimes also referred to as the URL "reference".</p>
<p>Passing an argument of QByteArray() (a null <a href="qbytearray.html">QByteArray</a>) will unset the fragment. Passing an argument of <a href="qbytearray.html">QByteArray</a>("") (an empty but not null <a href="qbytearray.html">QByteArray</a>) will set the fragment to an empty string (as if the original URL had a lone "#").</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setFragment">setFragment</a>() and <a href="qurl.html#encodedFragment">encodedFragment</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedHost" />
<h3 class="fn"><a name="setEncodedHost" />QUrl.setEncodedHost (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Sets the URL's host to the ACE- or percent-encoded <i>host</i>. The <i>host</i> is part of the user info element in the authority of the URL, as described in <a href="qurl.html#setAuthority">setAuthority</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setHost">setHost</a>(), <a href="qurl.html#encodedHost">encodedHost</a>(), <a href="qurl.html#setAuthority">setAuthority</a>(), and <a href="qurl.html#fromAce">fromAce</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedPassword" />
<h3 class="fn"><a name="setEncodedPassword" />QUrl.setEncodedPassword (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Sets the URL's password to the percent-encoded <i>password</i>. The <i>password</i> is part of the user info element in the authority of the URL, as described in <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<p>Note: this function does not verify that <i>password</i> is properly encoded. It is the caller's responsibility to ensure that the any delimiters (such as colons or slashes) are properly encoded.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setPassword">setPassword</a>(), <a href="qurl.html#encodedPassword">encodedPassword</a>(), and <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedPath" />
<h3 class="fn"><a name="setEncodedPath" />QUrl.setEncodedPath (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Sets the URL's path to the percent-encoded <i>path</i>. The path is the part of the URL that comes after the authority but before the query string.</p>
<p align="center"><img src="images/qurl-ftppath.png" /></p><p>For non-hierarchical schemes, the path will be everything following the scheme declaration, as in the following example:</p>
<p align="center"><img src="images/qurl-mailtopath.png" /></p><p>Note: this function does not verify that <i>path</i> is properly encoded. It is the caller's responsibility to ensure that the any delimiters (such as '?' and '#') are properly encoded.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setPath">setPath</a>(), <a href="qurl.html#encodedPath">encodedPath</a>(), and <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedQuery" />
<h3 class="fn"><a name="setEncodedQuery" />QUrl.setEncodedQuery (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Sets the query string of the URL to <i>query</i>. The string is inserted as-is, and no further encoding is performed when calling <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<p>This function is useful if you need to pass a query string that does not fit into the key-value pattern, or that uses a different scheme for encoding special characters than what is suggested by <a href="qurl.html">QUrl</a>.</p>
<p>Passing a value of QByteArray() to <i>query</i> (a null <a href="qbytearray.html">QByteArray</a>) unsets the query completely. However, passing a value of <a href="qbytearray.html">QByteArray</a>("") will set the query to an empty value, as if the original URL had a lone "?".</p>
<p>See also <a href="qurl.html#encodedQuery">encodedQuery</a>() and <a href="qurl.html#hasQuery">hasQuery</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedQueryItems" />
<h3 class="fn"><a name="setEncodedQueryItems" />QUrl.setEncodedQueryItems (<i>self</i>, list-of-tuple-of-QByteArray-QByteArray)</h3><p>Sets the query string of the URL to the encoded version of <i>query</i>. The contents of <i>query</i> are converted to a string internally, each pair delimited by the character returned by pairDelimiter(), and the key and value are delimited by valueDelimiter().</p>
<p>Note: this function does not verify that the key-value pairs are properly encoded. It is the caller's responsibility to ensure that the query delimiters are properly encoded, if any.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setQueryDelimiters">setQueryDelimiters</a>(), <a href="qurl.html#encodedQueryItems">encodedQueryItems</a>(), and <a href="qurl.html#setQueryItems">setQueryItems</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedUrl" />
<h3 class="fn"><a name="setEncodedUrl" />QUrl.setEncodedUrl (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Constructs a URL by parsing the contents of <i>encodedUrl</i>.</p>
<p><i>encodedUrl</i> is assumed to be a URL string in percent encoded form, containing only ASCII characters.</p>
<p>Use <a href="qurl.html#isValid">isValid</a>() to determine if a valid URL was constructed.</p>
<p>See also <a href="qurl.html#setUrl">setUrl</a>().</p>
<h3 class="fn"><a name="setEncodedUrl-2" />QUrl.setEncodedUrl (<i>self</i>, <a href="qbytearray.html">QByteArray</a>, <a href="qurl.html#ParsingMode-enum">ParsingMode</a>)</h3><p>Constructs a URL by parsing the contents of <i>encodedUrl</i> using the given <i>parsingMode</i>.</p>
<a name="//apple_ref/cpp/instm/QUrl/setEncodedUserName" />
<h3 class="fn"><a name="setEncodedUserName" />QUrl.setEncodedUserName (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Sets the URL's user name to the percent-encoded <i>userName</i>. The <i>userName</i> is part of the user info element in the authority of the URL, as described in <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<p>Note: this function does not verify that <i>userName</i> is properly encoded. It is the caller's responsibility to ensure that the any delimiters (such as colons or slashes) are properly encoded.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qurl.html#setUserName">setUserName</a>(), <a href="qurl.html#encodedUserName">encodedUserName</a>(), and <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setFragment" />
<h3 class="fn"><a name="setFragment" />QUrl.setFragment (<i>self</i>, QString)</h3><p>Sets the fragment of the URL to <i>fragment</i>. The fragment is the last part of the URL, represented by a '#' followed by a string of characters. It is typically used in HTTP for referring to a certain link or point on a page:</p>
<p align="center"><img src="images/qurl-fragment.png" /></p><p>The fragment is sometimes also referred to as the URL "reference".</p>
<p>Passing an argument of QString() (a null <a href="qstring.html">QString</a>) will unset the fragment. Passing an argument of <a href="qstring.html">QString</a>("") (an empty but not null <a href="qstring.html">QString</a>) will set the fragment to an empty string (as if the original URL had a lone "#").</p>
<p>See also <a href="qurl.html#fragment">fragment</a>() and <a href="qurl.html#hasFragment">hasFragment</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setHost" />
<h3 class="fn"><a name="setHost" />QUrl.setHost (<i>self</i>, QString)</h3><p>Sets the host of the URL to <i>host</i>. The host is part of the authority.</p>
<p>See also <a href="qurl.html#host">host</a>() and <a href="qurl.html#setAuthority">setAuthority</a>().</p>
<a name="//apple_ref/cpp/clm/QUrl/setIdnWhitelist" />
<h3 class="fn"><a name="setIdnWhitelist" />QUrl.setIdnWhitelist (QStringList)</h3><p>Sets the whitelist of Top-Level Domains (TLDs) that are allowed to have non-ASCII characters in domains to the value of <i>list</i>.</p>
<p>Qt has comes a default list that contains the Internet top-level domains that have published support for Internationalized Domain Names (IDNs) and rules to guarantee that no deception can happen between similarly-looking characters (such as the Latin lowercase letter <tt>'a'</tt> and the Cyrillic equivalent, which in most fonts are visually identical).</p>
<p>This list is periodically maintained, as registrars publish new rules.</p>
<p>This function is provided for those who need to manipulate the list, in order to add or remove a TLD. It is not recommended to change its value for purposes other than testing, as it may expose users to security risks.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qurl.html#idnWhitelist">idnWhitelist</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setPassword" />
<h3 class="fn"><a name="setPassword" />QUrl.setPassword (<i>self</i>, QString)</h3><p>Sets the URL's password to <i>password</i>. The <i>password</i> is part of the user info element in the authority of the URL, as described in <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<p>See also <a href="qurl.html#password">password</a>() and <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setPath" />
<h3 class="fn"><a name="setPath" />QUrl.setPath (<i>self</i>, QString)</h3><p>Sets the path of the URL to <i>path</i>. The path is the part of the URL that comes after the authority but before the query string.</p>
<p align="center"><img src="images/qurl-ftppath.png" /></p><p>For non-hierarchical schemes, the path will be everything following the scheme declaration, as in the following example:</p>
<p align="center"><img src="images/qurl-mailtopath.png" /></p><p>See also <a href="qurl.html#pathx">path</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setPort" />
<h3 class="fn"><a name="setPort" />QUrl.setPort (<i>self</i>, int)</h3><p>Sets the port of the URL to <i>port</i>. The port is part of the authority of the URL, as described in <a href="qurl.html#setAuthority">setAuthority</a>().</p>
<p><i>port</i> must be between 0 and 65535 inclusive. Setting the port to -1 indicates that the port is unspecified.</p>
<p>See also <a href="qurl.html#port">port</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setQueryDelimiters" />
<h3 class="fn"><a name="setQueryDelimiters" />QUrl.setQueryDelimiters (<i>self</i>, str, str)</h3><p>Sets the characters used for delimiting between keys and values, and between key-value pairs in the URL's query string. The default value delimiter is '=' and the default pair delimiter is '&amp;'.</p>
<p align="center"><img src="images/qurl-querystring.png" /></p><p><i>valueDelimiter</i> will be used for separating keys from values, and <i>pairDelimiter</i> will be used to separate key-value pairs. Any occurrences of these delimiting characters in the encoded representation of the keys and values of the query string are percent encoded.</p>
<p>If <i>valueDelimiter</i> is set to '-' and <i>pairDelimiter</i> is '/', the above query string would instead be represented like this:</p>
<pre> http:<span class="comment">//www.example.com/cgi-bin/drawgraph.cgi?type-pie/color-green</span></pre>
<p>Calling this function does not change the delimiters of the current query string. It only affects <a href="qurl.html#queryItems">queryItems</a>(), <a href="qurl.html#setQueryItems">setQueryItems</a>() and addQueryItems().</p>
<a name="//apple_ref/cpp/instm/QUrl/setQueryItems" />
<h3 class="fn"><a name="setQueryItems" />QUrl.setQueryItems (<i>self</i>, list-of-tuple-of-QString-QString)</h3><p>Sets the query string of the URL to an encoded version of <i>query</i>. The contents of <i>query</i> are converted to a string internally, each pair delimited by the character returned by pairDelimiter(), and the key and value are delimited by valueDelimiter().</p>
<p>See also <a href="qurl.html#setQueryDelimiters">setQueryDelimiters</a>(), <a href="qurl.html#queryItems">queryItems</a>(), and <a href="qurl.html#setEncodedQueryItems">setEncodedQueryItems</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setScheme" />
<h3 class="fn"><a name="setScheme" />QUrl.setScheme (<i>self</i>, QString)</h3><p>Sets the scheme of the URL to <i>scheme</i>. As a scheme can only contain ASCII characters, no conversion or encoding is done on the input.</p>
<p>The scheme describes the type (or protocol) of the URL. It's represented by one or more ASCII characters at the start the URL, and is followed by a ':'. The following example shows a URL where the scheme is "ftp":</p>
<p align="center"><img src="images/qurl-authority2.png" /></p><p>The scheme can also be empty, in which case the URL is interpreted as relative.</p>
<p>See also <a href="qurl.html#scheme">scheme</a>() and <a href="qurl.html#isRelative">isRelative</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setUrl" />
<h3 class="fn"><a name="setUrl" />QUrl.setUrl (<i>self</i>, QString)</h3><p>Constructs a URL by parsing the contents of <i>url</i>.</p>
<p><i>url</i> is assumed to be in unicode format, with no percent encoding.</p>
<p>Calling <a href="qurl.html#isValid">isValid</a>() will tell whether or not a valid URL was constructed.</p>
<p>See also <a href="qurl.html#setEncodedUrl">setEncodedUrl</a>().</p>
<h3 class="fn"><a name="setUrl-2" />QUrl.setUrl (<i>self</i>, QString, <a href="qurl.html#ParsingMode-enum">ParsingMode</a>)</h3><p>This is an overloaded function.</p>
<p>Parses <i>url</i> using the parsing mode <i>parsingMode</i>.</p>
<p>See also <a href="qurl.html#setEncodedUrl">setEncodedUrl</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setUserInfo" />
<h3 class="fn"><a name="setUserInfo" />QUrl.setUserInfo (<i>self</i>, QString)</h3><p>Sets the user info of the URL to <i>userInfo</i>. The user info is an optional part of the authority of the URL, as described in <a href="qurl.html#setAuthority">setAuthority</a>().</p>
<p>The user info consists of a user name and optionally a password, separated by a ':'. If the password is empty, the colon must be omitted. The following example shows a valid user info string:</p>
<p align="center"><img src="images/qurl-authority3.png" /></p><p>See also <a href="qurl.html#userInfo">userInfo</a>(), <a href="qurl.html#setUserName">setUserName</a>(), <a href="qurl.html#setPassword">setPassword</a>(), and <a href="qurl.html#setAuthority">setAuthority</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/setUserName" />
<h3 class="fn"><a name="setUserName" />QUrl.setUserName (<i>self</i>, QString)</h3><p>Sets the URL's user name to <i>userName</i>. The <i>userName</i> is part of the user info element in the authority of the URL, as described in <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<p>See also <a href="qurl.html#setEncodedUserName">setEncodedUserName</a>(), <a href="qurl.html#userName">userName</a>(), and <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<a name="//apple_ref/cpp/clm/QUrl/toAce" />
<h3 class="fn"><a name="toAce" /><a href="qbytearray.html">QByteArray</a> QUrl.toAce (QString)</h3><p>Returns the ASCII Compatible Encoding of the given domain name <i>domain</i>. The result of this function is considered equivalent to <i>domain</i>.</p>
<p>The ASCII-Compatible Encoding (ACE) is defined by RFC 3490, RFC 3491 and RFC 3492. It is part of the Internationalizing Domain Names in Applications (IDNA) specification, which allows for domain names (like <tt>"example.com"</tt>) to be written using international characters.</p>
<p>This function return an empty QByteArra if <i>domain</i> is not a valid hostname. Note, in particular, that IPv6 literals are not valid domain names.</p>
<p>This function was introduced in Qt 4.2.</p>
<a name="//apple_ref/cpp/instm/QUrl/toEncoded" />
<h3 class="fn"><a name="toEncoded" /><a href="qbytearray.html">QByteArray</a> QUrl.toEncoded (<i>self</i>, <a href="qurl-formattingoptions.html">FormattingOptions</a>&#160;<i>options</i>&#160;=&#160;QUrl.None)</h3><p>Returns the encoded representation of the URL if it's valid; otherwise an empty <a href="qbytearray.html">QByteArray</a> is returned. The output can be customized by passing flags with <i>options</i>.</p>
<p>The user info, path and fragment are all converted to UTF-8, and all non-ASCII characters are then percent encoded. The host name is encoded using Punycode.</p>
<a name="//apple_ref/cpp/instm/QUrl/toLocalFile" />
<h3 class="fn"><a name="toLocalFile" />QString QUrl.toLocalFile (<i>self</i>)</h3><p>Returns the path of this URL formatted as a local file path.</p>
<p>See also <a href="qurl.html#fromLocalFile">fromLocalFile</a>().</p>
<a name="//apple_ref/cpp/clm/QUrl/toPercentEncoding" />
<h3 class="fn"><a name="toPercentEncoding" /><a href="qbytearray.html">QByteArray</a> QUrl.toPercentEncoding (QString, <a href="qbytearray.html">QByteArray</a>&#160;<i>exclude</i>&#160;=&#160;QByteArray(), <a href="qbytearray.html">QByteArray</a>&#160;<i>include</i>&#160;=&#160;QByteArray())</h3><p>Returns an encoded copy of <i>input</i>. <i>input</i> is first converted to UTF-8, and all ASCII-characters that are not in the unreserved group are percent encoded. To prevent characters from being percent encoded pass them to <i>exclude</i>. To force characters to be percent encoded pass them to <i>include</i>.</p>
<p>Unreserved is defined as: ALPHA / DIGIT / "-" / "." / "<a href="examples-overview.html">_</a>" / "~"</p>
<pre> QByteArray ba = QUrl.toPercentEncoding("{a fishy string?}", "{}", "s");
 qDebug(ba.constData());
<span class="comment"> // prints "{a fi%73hy %73tring%3F}"</span></pre>
<a name="//apple_ref/cpp/instm/QUrl/toString" />
<h3 class="fn"><a name="toPunycode" /><a href="qbytearray.html">QByteArray</a> QUrl.toPunycode (QString)</h3><h3 class="fn"><a name="toString" />QString QUrl.toString (<i>self</i>, <a href="qurl-formattingoptions.html">FormattingOptions</a>&#160;<i>options</i>&#160;=&#160;QUrl.None)</h3><p>Returns the human-displayable string representation of the URL. The output can be customized by passing flags with <i>options</i>.</p>
<p>See also <a href="qurl.html#FormattingOption-enum">FormattingOptions</a> and <a href="qurl.html#toEncoded">toEncoded</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/userInfo" />
<h3 class="fn"><a name="userInfo" />QString QUrl.userInfo (<i>self</i>)</h3><p>Returns the user info of the URL, or an empty string if the user info is undefined.</p>
<p>See also <a href="qurl.html#setUserInfo">setUserInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/userName" />
<h3 class="fn"><a name="userName" />QString QUrl.userName (<i>self</i>)</h3><p>Returns the user name of the URL if it is defined; otherwise an empty string is returned.</p>
<p>See also <a href="qurl.html#setUserName">setUserName</a>() and <a href="qurl.html#encodedUserName">encodedUserName</a>().</p>
<a name="//apple_ref/cpp/instm/QUrl/operator!=" />
<h3 class="fn"><a name="__eq__" />bool QUrl.__eq__ (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><h3 class="fn"><a name="__ge__" />bool QUrl.__ge__ (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><h3 class="fn"><a name="__hash__" />int QUrl.__hash__ (<i>self</i>)</h3><h3 class="fn"><a name="__lt__" />bool QUrl.__lt__ (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><h3 class="fn"><a name="__ne__" />bool QUrl.__ne__ (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><h3 class="fn"><a name="__repr__" />str QUrl.__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.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>