File: qvaluelist.html

package info (click to toggle)
qt-embedded 2.3.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 68,608 kB
  • ctags: 45,998
  • sloc: cpp: 276,654; ansic: 71,987; makefile: 29,074; sh: 12,305; yacc: 2,465; python: 1,863; perl: 481; lex: 480; xml: 68; lisp: 15
file content (375 lines) | stat: -rw-r--r-- 23,424 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QValueList Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">

<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>

<h1 align=center>QValueList Class Reference</h1><br clear="all">
<p>
The QValueList class is a value based template class that provides doubly linked lists.
<a href="#details">More...</a>
<p>
<code>#include &lt;<a href="qvaluelist-h.html">qvaluelist.h</a>&gt;</code>
<p><a href="qvaluelist-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn"><a href="#96a811"><b>QValueList</b></a>()</div>
<li><div class="fn"><a href="#ca5e29"><b>QValueList</b></a>(constQValueList&lt;T&gt;&amp;l)</div>
<li><div class="fn"><a href="#abd29b"><b>~QValueList</b></a>()</div>
<li><div class="fn">QValueList&lt;T&gt;&amp;<a href="#23d705"><b>operator=</b></a>(constQValueList&lt;T&gt;&amp;l)</div>
<li><div class="fn">QValueList&lt;T&gt;<a href="#067aae"><b>operator+</b></a>(constQValueList&lt;T&gt;&amp;l)const</div>
<li><div class="fn">QValueList&lt;T&gt;&amp;<a href="#e8381f"><b>operator+=</b></a>(constQValueList&lt;T&gt;&amp;l)</div>
<li><div class="fn">bool<a href="#5e36b3"><b>operator==</b></a>(constQValueList&lt;T&gt;&amp;l)const</div>
<li><div class="fn">bool<a href="#dc3b9f"><b>operator!=</b></a>(constQValueList&lt;T&gt;&amp;l)const</div>
<li><div class="fn">Iterator<a href="#6372f0"><b>begin</b></a>()</div>
<li><div class="fn">ConstIterator<a href="#df2f80"><b>begin</b></a>()const</div>
<li><div class="fn">Iterator<a href="#4996b7"><b>end</b></a>()</div>
<li><div class="fn">ConstIterator<a href="#af2abd"><b>end</b></a>()const</div>
<li><div class="fn">Iterator<a href="#d314ba"><b>fromLast</b></a>()</div>
<li><div class="fn">ConstIterator<a href="#41e13a"><b>fromLast</b></a>()const</div>
<li><div class="fn">bool<a href="#aec057"><b>isEmpty</b></a>()const</div>
<li><div class="fn">Iterator<a href="#dc18c0"><b>insert</b></a>(Iteratorit, constT&amp;x)</div>
<li><div class="fn">Iterator<a href="#d68b11"><b>append</b></a>(constT&amp;x)</div>
<li><div class="fn">Iterator<a href="#3c41a9"><b>prepend</b></a>(constT&amp;x)</div>
<li><div class="fn">Iterator<a href="#273e70"><b>remove</b></a>(Iteratorit)</div>
<li><div class="fn">void<a href="#a04cb3"><b>remove</b></a>(constT&amp;x)</div>
<li><div class="fn">T&amp;<a href="#765ed5"><b>first</b></a>()</div>
<li><div class="fn">constT&amp;<a href="#1bbde8"><b>first</b></a>()const</div>
<li><div class="fn">T&amp;<a href="#3507b2"><b>last</b></a>()</div>
<li><div class="fn">constT&amp;<a href="#3e5330"><b>last</b></a>()const</div>
<li><div class="fn">T&amp;<a href="#b0eb54"><b>operator[]</b></a>(uinti)</div>
<li><div class="fn">constT&amp;<a href="#d89d04"><b>operator[]</b></a>(uinti)const</div>
<li><div class="fn">Iterator<a href="#578bc2"><b>at</b></a>(uinti)</div>
<li><div class="fn">ConstIterator<a href="#6fc7fb"><b>at</b></a>(uinti)const</div>
<li><div class="fn">Iterator<a href="#14e9f4"><b>find</b></a>(constT&amp;x)</div>
<li><div class="fn">ConstIterator<a href="#4a2978"><b>find</b></a>(constT&amp;x)const</div>
<li><div class="fn">Iterator<a href="#907a4c"><b>find</b></a>(Iteratorit, constT&amp;x)</div>
<li><div class="fn">ConstIterator<a href="#7dab45"><b>find</b></a>(ConstIteratorit, constT&amp;x)const</div>
<li><div class="fn">int<a href="#cff3f4"><b>findIndex</b></a>(constT&amp;x)const</div>
<li><div class="fn">uint<a href="#14aaf9"><b>contains</b></a>(constT&amp;x)const</div>
<li><div class="fn">uint<a href="#434489"><b>count</b></a>()const</div>
<li><div class="fn">void<a href="#7b8e9e"><b>clear</b></a>()</div>
<li><div class="fn">QValueList&lt;T&gt;&amp;<a href="#5e278c"><b>operator+=</b></a>(constT&amp;x)</div>
<li><div class="fn">QValueList&lt;T&gt;&amp;<a href="#757ead"><b>operator&lt;&lt;</b></a>(constT&amp;x)</div>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class="fn">void<a href="#c87033"><b>detach</b></a>()</div>
</ul>
<h2>Related Functions</h2>
(Note that these are not member functions.)
<ul>
<li>QDataStream&amp; <a href="qvaluelist.html#16822d"><b>operator&lt;&lt;</b></a> (QDataStream &amp; s, const QValueList&lt;T&gt; &amp; l)
<li>QDataStream&amp; <a href="qvaluelist.html#e1666a"><b>operator&gt;&gt;</b></a> (QDataStream &amp; s, QValueList&lt;T&gt; &amp; l)
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QValueList class is a value based template class that provides doubly linked lists.
<p>
Define a template instance QValueList&lt;X&gt; to create a list of values which all
have the class X. Please notice that QValueList does not store pointers to the
members of the list. It holds a copy of every member. That is the reason why this
kind of classes are called "value based" while <a href="qlist.html">QList</a> and <a href="qdict.html">QDict</a> are "reference based".
<p>Some classes can not be used within a QValueList,  for example everything
derived from <a href="qobject.html">QObject</a> and thus all classes that implement widgets.
Only values can be used in a QValueList. To qualify as a value, the class
must provide
<ul>
<li>a copy constructor,
<li>an assignment operator and
<li> a default constructor, i.e. a constructor that does not take any arguments.
</ul>
<p>Note that C++ defaults to field-by-field assignment operators and
copy constructors if no explicit version is supplied. In many cases,
this is sufficient.
<p>Example:
<pre>    #include &lt;qvaluelist.h&gt;
    #include &lt;qstring.h&gt;
    #include &lt;stdio.h&gt;

    class Employee
    {
    public:
        Employee(): s(0) {}
        Employee( const QString&amp; name, int salary )
            : n(name), s(salary)
        {}

        <a href="qstring.html">QString</a>     name()   const              { return n; }
        int         salary() const              { return s; }
        void        setSalary( int salary )     { s = salary; }
    private:
        <a href="qstring.html">QString</a>     n;
        int         s;
    };

    void main()
    {
        typedef QValueList&lt;Employee&gt; EmployeeList;
        EmployeeList list;              // list of Employee

        list.append( Employee("Bill", 50000) );
        list.append( Employee("Steve",80000) );
        list.append( Employee("Ron",  60000) );

        Employee joe( "Joe", 50000 );
        list.append( joe );
        joe.setSalary( 4000 );

        EmployeeList::Iterator it;
        for( it = list.begin(); it != list.end(); ++it )
            printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary().latin1() );
    }
</pre>
<p>Program output:
<pre>        Bill earns 50000
        Steve earns 80000
        Ron earns 60000
        Joe earns 50000
</pre>
<p>As you can see, the latest changes to Joes salary did not affect the value
in the list because the list created a copy of Joes entry.
<p>There are three ways of finding items in the list. The first one is by using
the <a href="#578bc2">at</a>() function. It returns an iterator. The advantages of
getting an iterator is that you can now move forward or backward from this
position by incrementing/decrementing the iterator. To get the amount of
items in the list call <a href="#434489">count</a>(). Valid indices are 0..count().
<p>The second way of accessing a list is with operator[]. That means you can address
it like an array. The return value is a reference to the value stored in the list.
There exist two versions of this operator. The first one is const and returns a
const reference to the value. The second on is non const and returns a non const
reference to the value. It is up to your compiler to choose the correct one.
<p>The third method is to use the functions <a href="#6372f0">begin</a>() and <a href="#4996b7">end</a>().
With a simple for loop as shown in the example you can iterate over the complete list.
It is save to have multiple iterators at the same time. If some member of the list is
removed then only iterators pointing to the removed member become invalid. Inserting in
the list does not invalidate any iterator. For convenience the function <a href="#3507b2">last</a>() returns
an iterator for the last and <a href="#1bbde8">first</a>() for the first element in the list.
<p>In addition you can search items in the list with the <a href="#14e9f4">find</a>() function. It exists in a const
and a non const version. It starts searching from the beginning of the list, but another
flavor of the find() function allows you to specify where searching should start.
If you just want to know wether a certain item is at least once in the list, then you
can use the <a href="#14aaf9">contains</a>() function.
<p>Since QValueList is value based there is no need to care about deleting elements in the
list. The list holds its own copies and will free them if the corresponding member or
the list itself is deleted. You can force the list to free all of its item with <a href="#7b8e9e">clear</a>().
<p>QValueList is implicitly shared. That means you can just make copies of the list
in time O(1). If multiple QValueList instances share the same data and one
is doing a modification of the lists data then this modifying instance makes a copy
and modifies its private copy. So it does not affect the other instances.
From a developers point of view you can think that a QValueList and a copy of this
list have nothing to do with each other. Developers may only notice that copying is
very fast. People known to a CPUs MMU architecture will know this pattern as "copy on write".
<p>There exist three functions to insert items in the list. <a href="#d68b11">append</a>()
inserts an item at the end, <a href="#3c41a9">prepend</a>() inserts at the beginning
and <a href="#dc18c0">insert</a>() inserts in front of the position given by an iterator.
<p>Items can be removed from the list in two ways. The first is to pass an iterator to
the <a href="#273e70">remove</a>(). The other possibility is to pass a value to remove() which will
delete all members which match this value.
<p>Lists can be sorted with the algorithms provided by the <a
href="qtl.html">Qt Template Library</a>, for example with
qHeapSort():
<p>Example:
<pre>          <a href="qvaluelist.html">QValueList</a> l;
          l.<a href="#d68b11">append</a>( 5 );
          l.<a href="#d68b11">append</a>( 8 );
          l.<a href="#d68b11">append</a>( 3 );
          l.<a href="#d68b11">append</a>( 4 );
          qHeapSort( l );
</pre>
<p>See also  <a href="qvaluelistiterator.html">QValueListIterator</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="96a811"></a>QValueList::QValueList()</h3>
<p>Constructs an empty list.
<h3 class="fn"><a name="ca5e29"></a>QValueList::QValueList(constQValueList&lt;T&gt;&amp;l)</h3>
<p>Constructs a copy of <em>l.</em>
<p>This operation costs O(1) time since QValueList is implicit shared.
The first instance applying modifications to a shared list will create
a copy which takes in turn O(<a href="n.html">n</a>) time. However returning a QValueList from
a function is very fast.
<h3 class="fn"><a name="abd29b"></a>QValueList::~QValueList()</h3>
<p>Destroys the list. References to the values in the list and all iterators
of this list become invalidated. Since QValueList is highly tuned for performance
you wont see warnings if you use invalid iterators,
because it is impossible for
an iterator to check wether it is valid or not.
<h3 class="fn">Iterator<a name="d68b11"></a>QValueList::append(constT&amp;x)</h3>
<p>Inserts the value <em>x</em> at the end of the list.
<p>Returns an iterator pointing at the inserted item.
<p>See also  <a href="#dc18c0">insert</a>() and <a href="#3c41a9">prepend</a>().
<h3 class="fn">ConstIterator<a name="6fc7fb"></a>QValueList::at(uinti)const</h3>
<p>Returns an iterator pointing to the item at position <em>i</em> in the list, or
<a href="#4996b7">end</a>() if the index is out of range.
<h3 class="fn">Iterator<a name="578bc2"></a>QValueList::at(uinti)</h3>
<p>Returns an iterator pointing to the item at position <em>i</em> in the list, or
<a href="#4996b7">end</a>() if the index is out of range.
<h3 class="fn">ConstIterator<a name="df2f80"></a>QValueList::begin()const</h3>
<p>Returns an iterator pointing to the first element in the list. This
iterator equals <a href="#4996b7">end</a>() if the list is empty;
<p>See also  <a href="#1bbde8">first</a>() and <a href="#4996b7">end</a>().
<h3 class="fn">Iterator<a name="6372f0"></a>QValueList::begin()</h3>
<p>Returns an iterator pointing to the first element in the list. This
iterator equals <a href="#4996b7">end</a>() if the list is empty;
<p>See also  <a href="#1bbde8">first</a>() and <a href="#4996b7">end</a>().
<h3 class="fn">void<a name="7b8e9e"></a>QValueList::clear()</h3>
<p>Removes all items from the list.
<p>See also  <a href="#273e70">remove</a>().
<h3 class="fn">uint<a name="14aaf9"></a>QValueList::contains(constT&amp;x)const</h3>
<p>Counts and returns the number of occurrences of the value <em>x</em> in the list.
<h3 class="fn">uint<a name="434489"></a>QValueList::count()const</h3>
<p>Returns the number of items in the list.
<p>See also  <a href="#aec057">isEmpty</a>().
<h3 class="fn">void<a name="c87033"></a>QValueList::detach() <code>[protected]</code></h3>
<p>If the list does not share its data with another QValueList instance, then nothing
happens, otherwise the function creates a new copy of this data and detaches
from the shared one. This function is called whenever the list is modified.
The implicit sharing mechanism is implemented this way.
<h3 class="fn">ConstIterator<a name="af2abd"></a>QValueList::end()const</h3>
<p>Returns an iterator pointing behind the last element in the list. This
iterator equals <a href="#6372f0">begin</a>() if the list is empty.
<p>See also  <a href="#3507b2">last</a>() and <a href="#6372f0">begin</a>().
<h3 class="fn">Iterator<a name="4996b7"></a>QValueList::end()</h3>
<p>Returns an iterator pointing behind the last element in the list. This
iterator equals <a href="#6372f0">begin</a>() if the list is empty.
<p>See also  <a href="#3507b2">last</a>() and <a href="#6372f0">begin</a>().
<h3 class="fn">ConstIterator<a name="7dab45"></a>QValueList::find(ConstIteratorit, constT&amp;x)const</h3>
<p>Finds the first occurrence of <em>x</em> in the list starting at
the position given by <em>it.</em>
<p>Returns <a href="#4996b7">end</a>() if no item did match.
<h3 class="fn">ConstIterator<a name="4a2978"></a>QValueList::find(constT&amp;x)const</h3>
<p>Finds the first occurrence of <em>x</em> in the list.
<p>Returns <a href="#4996b7">end</a>() if no item did match.
<h3 class="fn">Iterator<a name="907a4c"></a>QValueList::find(Iteratorit, constT&amp;x)</h3>
<p>Finds the first occurrence of <em>x</em> in the list starting at
the position given by <em>it.</em>
<p>Returns <a href="#4996b7">end</a>() if no item did match.
<h3 class="fn">Iterator<a name="14e9f4"></a>QValueList::find(constT&amp;x)</h3>
<p>Finds the first occurrence of <em>x</em> in the list.
<p>Returns <a href="#4996b7">end</a>() if no item did match.
<h3 class="fn">int<a name="cff3f4"></a>QValueList::findIndex(constT&amp;x)const</h3>
<p>Returns the first index of the value <em>x</em> in the list or -1 if no such value
can be found in the list.
<h3 class="fn">T&amp;<a name="765ed5"></a>QValueList::first()</h3>
<p>Returns a reference to the first item in the list or the item
referenced by <a href="#4996b7">end</a>()
if no such items exists. Please note that you may not change
the value the end() Iterator is pointing to.
<p>See also  <a href="#6372f0">begin</a>() and <a href="#3507b2">last</a>().
<h3 class="fn">constT&amp;<a name="1bbde8"></a>QValueList::first()const</h3>
<p>Returns a reference to the first item in the list or the item
referenced by <a href="#4996b7">end</a>() if
no such items exists.
<p>See also  <a href="#6372f0">begin</a>() and <a href="#3507b2">last</a>().
<h3 class="fn">ConstIterator<a name="41e13a"></a>QValueList::fromLast()const</h3>
<p>Returns an iterator pointing to the last element in the list or
<a href="#4996b7">end</a>() if no such item exists.
<p>See also  <a href="#3507b2">last</a>().
<h3 class="fn">Iterator<a name="d314ba"></a>QValueList::fromLast()</h3>
<p>Returns an iterator pointing to the last element in the list or
<a href="#4996b7">end</a>() if no such item exists.
<p>See also  <a href="#3507b2">last</a>().
<h3 class="fn">Iterator<a name="dc18c0"></a>QValueList::insert(Iteratorit, constT&amp;x)</h3>
<p>Inserts the value <em>x</em> in front of the iterator <em>it.</em>
<p>Returns an iterator pointing at the inserted item.
<p>See also  <a href="#d68b11">append</a>() and <a href="#3c41a9">prepend</a>().
<h3 class="fn">bool<a name="aec057"></a>QValueList::isEmpty()const</h3>
<p>Returns TRUE if the list is empty, i.e. <a href="#434489">count</a>() == 0. Returns FALSE
otherwise.
<p>See also  <a href="#434489">count</a>().
<h3 class="fn">T&amp;<a name="3507b2"></a>QValueList::last()</h3>
<p>Returns a reference to the last item in the list or the item
referenced by <a href="#4996b7">end</a>() if no
such item exists. Please note that you may not change
the value the end() Iterator is pointing to.
<p>See also  <a href="#4996b7">end</a>(), <a href="#1bbde8">first</a>() and <a href="#41e13a">fromLast</a>().
<h3 class="fn">constT&amp;<a name="3e5330"></a>QValueList::last()const</h3>
<p>Returns a reference to the last item in the list or the item
referenced by <a href="#4996b7">end</a>() if no such item exists.
<p>See also  <a href="#4996b7">end</a>(), <a href="#1bbde8">first</a>() and <a href="#41e13a">fromLast</a>().
<h3 class="fn">bool<a name="dc3b9f"></a>QValueList::operator!=(constQValueList&lt;T&gt;&amp;l)const</h3>
<p>Compares both lists.
<p>Returns TRUE if both list are unequal.
<h3 class="fn">QValueList&lt;T&gt;<a name="067aae"></a>QValueList::operator+(constQValueList&lt;T&gt;&amp;l)const</h3>
<p>Creates a new list and fills it with the elements of this list. Then the
elements of <em>l</em> are appended.
<p>Returns the new list.
<h3 class="fn">QValueList&lt;T&gt;&amp;<a name="e8381f"></a>QValueList::operator+=(constQValueList&lt;T&gt;&amp;l)</h3>
<p>Adds <em>list</em> to this list.
<p>Returns a reference to this list.
<h3 class="fn">QValueList&lt;T&gt;&amp;<a name="5e278c"></a>QValueList::operator+=(constT&amp;x)</h3>
<p>Adds the value <em>x</em> to the end of the list.
<p>Returns a reference to the list.
<h3 class="fn">QValueList&lt;T&gt;&amp;<a name="757ead"></a>QValueList::operator&lt;&lt;(constT&amp;x)</h3>
<p>Adds the value <em>x</em> to the end of the list.
<p>Returns a reference to the list.
<h3 class="fn">QValueList&lt;T&gt;&amp;<a name="23d705"></a>QValueList::operator=(constQValueList&lt;T&gt;&amp;l)</h3>
<p>Assigns <em>l</em> to this list and returns a reference to this list.
<p>All iterators of the current list become invalidated by this operation.
The cost of such an assignment is O(1) since QValueList is implicitly shared.
<h3 class="fn">bool<a name="5e36b3"></a>QValueList::operator==(constQValueList&lt;T&gt;&amp;l)const</h3>
<p>Compares both lists.
<p>Returns TRUE if both list are equal.
<h3 class="fn">T&amp;<a name="b0eb54"></a>QValueList::operator[](uinti)</h3>
<p>Returns a reference to the item with index <em>i</em> in the list.
It is up to you to check wether this item really exists. You can do that easily
with the <a href="#434489">count</a>() function. However this operator does not check wether <em>i</em>
is in range and will deliver undefined results if it does not exist.
In contrast to the const operator[] you may manipulate the value returned by this
operator.
<h3 class="fn">constT&amp;<a name="d89d04"></a>QValueList::operator[](uinti)const</h3>
<p>Returns a const reference to the item with index <em>i</em> in the list.
It is up to you to check wether this item really exists. You can do that easily
with the <a href="#434489">count</a>() function. However this operator does not check wether <em>i</em>
is in range and will deliver undefined results if it does not exist.
<h3 class="fn">Iterator<a name="3c41a9"></a>QValueList::prepend(constT&amp;x)</h3>
<p>Inserts the value <em>x</em> at the beginning of the list.
<p>Returns an iterator pointing at the inserted item.
<p>See also  <a href="#dc18c0">insert</a>() and <a href="#d68b11">append</a>().
<h3 class="fn">Iterator<a name="273e70"></a>QValueList::remove(Iteratorit)</h3>
<p>Removes the item at position <em>it</em> in the list.
<p>Returns an iterator pointing to the item following the
removed on or <a href="#4996b7">end</a>() if the last item was deleted.
<p>See also  <a href="#7b8e9e">clear</a>().
<h3 class="fn">void<a name="a04cb3"></a>QValueList::remove(constT&amp;x)</h3>
<p>Removes all items which have the value <em>x.</em>
<p>See also  <a href="#7b8e9e">clear</a>().
<hr><h2>Related Functions</h2>
<h3><a href="qdatastream.html">QDataStream</a>&amp; <a name="16822d"></a>operator&lt;&lt; (<a href="qdatastream.html">QDataStream</a> &amp; s, const QValueList&lt;T&gt; &amp; l)</h3>
<p>Writes a list to the stream. The type <em>T</em> stored in the list must implement
the streaming operator, too.

<h3><a href="qdatastream.html">QDataStream</a>&amp; <a name="e1666a"></a>operator&gt;&gt; (<a href="qdatastream.html">QDataStream</a> &amp; s, QValueList&lt;T&gt; &amp; l)</h3>
<p>Reads a list from the stream. The type <em>T</em> stored in the list must implement
the streaming operator, too.

<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright &copy; 1995-2001
<a href="http://www.trolltech.com">Trolltech</a>, all rights reserved.<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright  2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>