Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_corelib_io_qtextstream.cpp File Reference

(69d4ecd6ef9057cb3703178277042ff7a7411459)

Go to the source code of this file.

Functions

 if (data.open(QFile::WriteOnly|QFile::Truncate))
 
 while (stream.readLineInto(&line))
 
int main (int argc, char *argv[])
 [2]
 
QTextStream in (stdin)
 
out setFieldWidth (10)
 
out setFieldAlignment (QTextStream::AlignCenter)
 
out setPadChar ('-')
 

Variables

QFile data ("output.txt")
 [0]
 
QTextStream stream (stdin)
 [0]
 
QString line = scene.addLine(QLineF(-10, -10, 20, 20))
 
QTextStream in ("0x50 0x20")
 [1]
 
int firstNumber
 
int secondNumber
 
char ch
 
QString str
 [3]
 
QString s
 [4]
 
out<< "Qt"<< "rocks!";----Qt------rocks!--QTextStream in(file);QChar ch1, ch2, ch3;in > ch1 ch2 ch3
 
QTextStream out (stdout)
 [7]
 

Function Documentation

◆ if()

if ( data. openQFile::WriteOnly|QFile::Truncate)

Definition at line 6 of file src_corelib_io_qtextstream.cpp.

◆ in()

QTextStream in ( stdin )

◆ main()

int main ( int argc,
char * argv[] )

[2]

[3]

[printing a custom type]

[printing a custom type] [storing a custom value]

[storing a custom value]

[retrieving a custom value]

[retrieving a custom value]

Definition at line 36 of file src_corelib_io_qtextstream.cpp.

◆ setFieldAlignment()

out setFieldAlignment ( QTextStream::AlignCenter )

◆ setFieldWidth()

out setFieldWidth ( 10 )

◆ setPadChar()

out setPadChar ( '-' )

◆ while()

while ( stream.readLineInto & line)

Definition at line 17 of file src_corelib_io_qtextstream.cpp.

Variable Documentation

◆ ch

in ch

Definition at line 30 of file src_corelib_io_qtextstream.cpp.

◆ ch3

out<< "Qt" << "rocks!";----Qt------rocks!--QTextStream in(file);QChar ch1, ch2, ch3;in > ch1 ch2 ch3

Definition at line 74 of file src_corelib_io_qtextstream.cpp.

◆ data

QFile data("output.txt") ( "output.txt" )

[0]

◆ firstNumber

in firstNumber

Definition at line 25 of file src_corelib_io_qtextstream.cpp.

◆ in

QTextStream in(stdin) ( "0x50 0x20" )

[1]

[2]

◆ line

QGraphicsLineItem * line = scene.addLine(QLineF(-10, -10, 20, 20))

Definition at line 16 of file src_corelib_io_qtextstream.cpp.

◆ out

out<< v v=QVariant(tr("hello")) int y=v.toInt() QString s=v.toString() out<< v ...QDataStream in(...) in > v ( stdout )

[7]

[0]

[8]

Definition at line 17 of file src_corelib_kernel_qvariant.cpp.

Referenced by main().

◆ s

[4]

[5]

Definition at line 57 of file src_corelib_io_qtextstream.cpp.

◆ secondNumber

in dec secondNumber

Definition at line 25 of file src_corelib_io_qtextstream.cpp.

◆ str

in str

[3]

[4]

Definition at line 50 of file src_corelib_io_qtextstream.cpp.

◆ stream

QTextStream stream(stdin) ( stdin )

[0]

[1]

Referenced by printErr(), and printOut().