Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_corelib_tools_qlist.cpp File Reference

(7d542e1daf09caadf6d3e36c4b09bdf94952c5a1)

Go to the source code of this file.

Functions

QList< QStringlist (200, "Pass")
 [1]
 
 if (list[0]=="Liz") list[0]
 [2]
 
 for (qsizetype i=0;i< list.size();++i)
 [3]
 
 if (i !=-1) cout<< "First occurrence of Harumi is at position "<< i<< endl
 
QList< int > list (10)
 [5]
 
list append ("one")
 
list append ("two")
 
list append (three)
 
list append (std::move(three))
 
list emplace (1, 2, 'b')
 
list emplaceBack (3, 'a')
 
 qDebug ()<< list
 [1]
 
list prepend ("one")
 
list prepend ("two")
 
list prepend ("three")
 
list insert (2, "gamma")
 
list insert (1, 3, 9.9)
 
QList< QStringlist (3)
 [10]
 
list fill ("Yes")
 
list fill ("oh", 5)
 
list indexOf ("B")
 
list indexOf ("B", 1)
 
list indexOf ("B", 2)
 
list indexOf ("X")
 
list lastIndexOf ("B")
 
list lastIndexOf ("B", 3)
 
list lastIndexOf ("B", 2)
 
list lastIndexOf ("X")
 

Variables

QList< int > integerList
 [0]
 
QList< QStringstringList
 
QList< QStringlist (200) {"a", "ccc"}
 [0]
 
qsizetype i = list.indexOf("Harumi")
 [4]
 
int * data = list.data()
 
QString three = "three"
 
auto & ref = list.emplaceBack()
 

Function Documentation

◆ append() [1/4]

list append ( "one" )

◆ append() [2/4]

list append ( "two" )

◆ append() [3/4]

list append ( std::move(three) )

◆ append() [4/4]

list append ( three )

◆ emplace()

list emplace ( 1 ,
2 ,
'b'  )

Referenced by QVarLengthArray< T, Prealloc >::insert().

+ Here is the caller graph for this function:

◆ emplaceBack()

list emplaceBack ( 3 ,
'a'  )

◆ fill() [1/2]

list fill ( "oh" ,
5  )

◆ fill() [2/2]

list fill ( "Yes" )

◆ for()

for ( )

[3]

[4]

Definition at line 27 of file src_corelib_tools_qlist.cpp.

References QList< T >::at(), i, and list.

+ Here is the call graph for this function:

◆ if() [1/2]

if ( i ! = -1)

◆ if() [2/2]

if ( list [0] = ="Liz")

[2]

[3]

◆ indexOf() [1/4]

◆ indexOf() [2/4]

list indexOf ( "B" ,
1  )

◆ indexOf() [3/4]

list indexOf ( "B" ,
2  )

◆ indexOf() [4/4]

list indexOf ( "X" )

◆ insert() [1/2]

list insert ( 1 ,
3 ,
9. 9 )

◆ insert() [2/2]

list insert ( 2 ,
"gamma"  )

◆ lastIndexOf() [1/4]

list lastIndexOf ( "B" )

Referenced by QString::lastIndexOf(), QByteArrayView::lastIndexOf(), QByteArray::lastIndexOf(), QString::lastIndexOf(), QString::lastIndexOf(), and QString::lastIndexOf().

+ Here is the caller graph for this function:

◆ lastIndexOf() [2/4]

list lastIndexOf ( "B" ,
2  )

◆ lastIndexOf() [3/4]

list lastIndexOf ( "B" ,
3  )

◆ lastIndexOf() [4/4]

list lastIndexOf ( "X" )

◆ list() [1/3]

QList< int > list ( 10 )

[5]

[6]

◆ list() [2/3]

QList< QString > list ( 200 ,
"Pass"  )

[1]

[2]

◆ list() [3/3]

QList< QString > list ( 3 )

[10]

[11]

◆ prepend() [1/3]

◆ prepend() [2/3]

list prepend ( "three" )

◆ prepend() [3/3]

list prepend ( "two" )

◆ qDebug()

qDebug ( )

[1]

[7]

[toString]

Variable Documentation

◆ data

int* data = list.data()
related

Definition at line 43 of file src_corelib_tools_qlist.cpp.

◆ i

qsizetype i = list.indexOf("Harumi")

[4]

[5]

Definition at line 35 of file src_corelib_tools_qlist.cpp.

Referenced by for().

◆ integerList

QList<int> integerList

[0]

Definition at line 5 of file src_corelib_tools_qlist.cpp.

◆ list

QList<QString> list ( 200 ) {"a", "ccc"}

[0]

[5]

[1]

[2]

[6]

[7]

[move-append]

[emplace]

[emplace-back]

[emplace-back-ref]

[8]

[9]

[10]

[11]

[12]

[13]

Definition at line 50 of file src_corelib_tools_qlist.cpp.

Referenced by for().

◆ ref

Definition at line 88 of file src_corelib_tools_qlist.cpp.

◆ stringList

◆ three

QString three = "three"

Definition at line 53 of file src_corelib_tools_qlist.cpp.