Obsolete Members for QStringRef

以下成員源於類 QStringRef 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

公共函數

(obsolete) QByteArray toAscii () const

成員函數文檔編製

QByteArray QStringRef:: toAscii () const

Returns an 8-bit representation of the string as a QByteArray .

This function does the same as toLatin1 ().

Note that, despite the name, this function does not necessarily return an US-ASCII (ANSI X3.4-1986) string and its result may not be US-ASCII compatible.

該函數在 Qt 4.8 引入。

另請參閱 toLatin1 (), toUtf8 (), toLocal8Bit (),和 QTextCodec .