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

    上一话题

    QTextBlock

    下一话题

    QTextBlockUserData

    QTextBlock.iterator

    概要

    函数

    详细描述

    QTextBlock.iterator 类提供迭代器用于读取内容在 PySide.QtGui.QTextBlock .

    A block consists of a sequence of text fragments. This class provides a way to iterate over these, and read their contents. It does not provide a way to modify the internal structure or contents of the block.

    An iterator can be constructed and used to access the fragments within a text block in the following way:

    QTextBlock::iterator it;
    for (it = currentBlock.begin(); !(it.atEnd()); ++it) {
        QTextFragment currentFragment = it.fragment();
        if (currentFragment.isValid())
            processFragment(currentFragment);
    }
    									
    class PySide.QtGui.QTextBlock. iterator
    class PySide.QtGui.QTextBlock. iterator ( o )
    参数: o PySide.QtGui.QTextBlock::iterator

    为此文本块构造迭代器。

    Copy constructor. Constructs a copy of the other iterator.

    PySide.QtGui.QTextBlock.iterator. __iter__ ( )
    返回类型: PyObject
    PySide.QtGui.QTextBlock.iterator. __next__ ( )
    返回类型: PyObject
    PySide.QtGui.QTextBlock.iterator. atEnd ( )
    返回类型: PySide.QtCore.bool

    Returns true if the current item is the last item in the text block.

    PySide.QtGui.QTextBlock.iterator. fragment ( )
    返回类型: PySide.QtGui.QTextFragment

    返回迭代器目前指向的文本片段。

    PySide.QtGui.QTextBlock.iterator. __ne__ ( o )
    参数: o PySide.QtGui.QTextBlock::iterator
    返回类型: PySide.QtCore.bool

    Retuns true if this iterator is different from the other iterator; otherwise returns false.

    PySide.QtGui.QTextBlock.iterator.operator++(arg__1)
    参数: arg__1 PySide.QtCore.int
    返回类型: PySide.QtGui.QTextBlock::iterator

    The postfix ++ operator ( i++ ) advances the iterator to the next item in the text block and returns an iterator to the old current item.

    PySide.QtGui.QTextBlock.iterator.operator--(arg__1)
    参数: arg__1 PySide.QtCore.int
    返回类型: PySide.QtGui.QTextBlock::iterator

    The postfix – operator ( i-- ) makes the preceding item current and returns an iterator to the old current item.

    PySide.QtGui.QTextBlock.iterator. __eq__ ( o )
    参数: o PySide.QtGui.QTextBlock::iterator
    返回类型: PySide.QtCore.bool

    Retuns true if this iterator is the same as the other iterator; otherwise returns false.