• PySide 模块
  • PySide.QtCore
  • 内容表

    上一话题

    QFileInfo

    下一话题

    QTextEncoder

    QTextDecoder

    概要

    函数

    详细描述

    PySide.QtCore.QTextDecoder class provides a state-based decoder.

    A text decoder converts text from an encoded text format into Unicode using a specific codec.

    The decoder converts text in this format into Unicode, remembering any state that is required between calls.

    class PySide.QtCore. QTextDecoder ( codec )
    class PySide.QtCore. QTextDecoder ( codec , flags )
    参数:

    Constructs a text decoder for the given codec .

    PySide.QtCore.QTextDecoder. hasFailure ( )
    返回类型: PySide.QtCore.bool

    Determines whether the decoder encountered a failure while decoding the input. If an error was encountered, the produced result is undefined, and gets converted as according to the conversion flags.

    PySide.QtCore.QTextDecoder. toUnicode ( ba )
    参数: ba PySide.QtCore.QByteArray
    返回类型: unicode

    这是重载函数。

    Converts the bytes in the byte array specified by ba to Unicode and returns the result.