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 .