Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
doc_src_qalgorithms.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
5
double
pi
= 3.14;
6
double
e
= 2.71;
7
8
qSwap
(
pi
,
e
);
9
// pi == 2.71, e == 3.14
11
12
14
QList<Employee *>
list
;
15
list
.append(
new
Employee
(
"Blackpool"
,
"Stephen"
));
16
list
.append(
new
Employee
(
"Twist"
,
"Oliver"
));
17
18
qDeleteAll
(
list
.begin(),
list
.end());
19
list
.clear();
Employee
[0]
Definition
doc_src_containers.cpp:6
QList
Definition
qlist.h:74
pi
double pi
[0]
Definition
doc_src_qalgorithms.cpp:5
qSwap
qSwap(pi, e)
qDeleteAll
qDeleteAll(list.begin(), list.end())
e
double e
Definition
doc_src_qalgorithms.cpp:6
list
QList< Employee * > list
[0]
Definition
doc_src_qalgorithms.cpp:14
qtbase
src
corelib
doc
snippets
code
doc_src_qalgorithms.cpp
Generated by
1.9.7