Compatibility Members for QTextStream

以下成员源于类 QTextStream are part of the Qt compatibility layer. We advise against using them in new code.

公共类型

enum 编码 { Latin1, Locale, RawUnicode, Unicode, ..., UnicodeUTF8 }

公共函数

int fill (int f )
int flags () const
int flags (int f )
int precision (int p )
QString read ()
void setEncoding (Encoding encoding )
int setf (int bits )
int setf (int bits , int mask )
void unsetDevice ()
int unsetf (int bits )
int width (int w )

静态公共成员

const int adjustfield
const int basefield
const int bin
const int dec
const int fixed
const int floatfield
const int hex
const int internal
const int left
const int oct
const int right
const int scientific
const int showbase
const int showpoint
const int showpos
const int skipws
const int uppercase

成员类型文档编制

enum QTextStream:: 编码

常量 描述
QTextStream::Latin1 1 使用 setCodec ( QTextCodec::codecForName ("ISO-8859-1")) instead.
QTextStream::Locale 0 使用 setCodec ( QTextCodec::codecForLocale ()) instead.
QTextStream::RawUnicode 5 使用 setCodec ( QTextCodec::codecForName ("UTF-16")) instead.
QTextStream::Unicode 2 使用 setCodec ( QTextCodec::codecForName ("UTF-16")) instead.
QTextStream::UnicodeNetworkOrder 3 使用 setCodec ( QTextCodec::codecForName ("UTF-16BE")) instead.
QTextStream::UnicodeReverse 4 使用 setCodec ( QTextCodec::codecForName ("UTF-16LE")) instead.
QTextStream::UnicodeUTF8 6 使用 setCodec ( QTextCodec::codecForName ("UTF-8")) instead.

Also, for all encodings except QTextStream::Latin1 and QTextStream::UTF8, you need to call setAutoDetectUnicode (false) to obtain the Qt 3 behavior in addition to the setCodec () 调用。

另请参阅 setCodec () 和 setAutoDetectUnicode ().

成员函数文档编制

int QTextStream:: fill ( int f )

使用 setPadChar () 代替。

int QTextStream:: flags () const

使用 fieldAlignment (), padChar (), fieldWidth (), numberFlags (), integerBase (), realNumberNotation (),和 realNumberNotation 代替。

int QTextStream:: flags ( int f )

使用 setFieldAlignment (), setPadChar (), setFieldWidth (), setNumberFlags (), setIntegerBase (), setRealNumberNotation (),和 setRealNumberNotation 代替。

int QTextStream:: precision ( int p )

使用 setRealNumberPrecision () 代替。

QString QTextStream:: read ()

使用 readAll () 或 readLine () 代替。

void QTextStream:: setEncoding ( 编码 encoding )

使用 setCodec () 和 setAutoDetectUnicode () 代替。

int QTextStream:: setf ( int bits )

使用 setFieldAlignment (), setPadChar (), setFieldWidth (), setNumberFlags (), setIntegerBase (), setRealNumberNotation (),和 setRealNumberNotation 代替。

int QTextStream:: setf ( int bits , int mask )

使用 setFieldAlignment (), setPadChar (), setFieldWidth (), setNumberFlags (), setIntegerBase (), setRealNumberNotation (),和 setRealNumberNotation 代替。

void QTextStream:: unsetDevice ()

使用 setDevice (0) instead.

int QTextStream:: unsetf ( int bits )

使用 setFieldAlignment (), setPadChar (), setFieldWidth (), setNumberFlags (), setIntegerBase (), setRealNumberNotation (),和 setRealNumberNotation 代替。

int QTextStream:: width ( int w )

使用 setFieldWidth () 代替。

成员变量文档编制

const int QTextStream:: adjustfield

Use the new QTextStream 操作符 代替。

const int QTextStream:: basefield

Use the new QTextStream 操作符 代替。

const int QTextStream:: bin

Use the new QTextStream 操作符 代替。

const int QTextStream:: dec

Use the new QTextStream 操作符 代替。

const int QTextStream:: fixed

Use the new QTextStream 操作符 代替。

const int QTextStream:: floatfield

Use the new QTextStream 操作符 代替。

const int QTextStream:: hex

Use the new QTextStream 操作符 代替。

const int QTextStream:: internal

Use the new QTextStream 操作符 代替。

const int QTextStream:: left

Use the new QTextStream 操作符 代替。

const int QTextStream:: oct

Use the new QTextStream 操作符 代替。

const int QTextStream:: right

Use the new QTextStream 操作符 代替。

const int QTextStream:: scientific

Use the new QTextStream 操作符 代替。

const int QTextStream:: showbase

Use the new QTextStream 操作符 代替。

const int QTextStream:: showpoint

Use the new QTextStream 操作符 代替。

const int QTextStream:: showpos

Use the new QTextStream 操作符 代替。

const int QTextStream:: skipws

Use the new QTextStream 操作符 代替。

const int QTextStream:: uppercase

Use the new QTextStream 操作符 代替。