iterator#

The iterator class provides an iterator for reading the contents of a QTextFrame . More

Synopsis#

Functions#

Detailed Description#

A frame consists of an arbitrary sequence of QTextBlock s and child QTextFrame s. This class provides a way to iterate over the child objects of a frame, and read their contents. It does not provide a way to modify the contents of the frame.

class PySide6.QtGui.QTextFrame.iterator#

PySide6.QtGui.QTextFrame.iterator(iterator)

Parameters

iteratorPySide6.QtGui.QTextFrame.iterator

Constructs an invalid iterator.

PySide6.QtGui.QTextFrame.iterator.__iter__()#
Return type

object

PySide6.QtGui.QTextFrame.iterator.__next__()#
Return type

object

PySide6.QtGui.QTextFrame.iterator.atEnd()#
Return type

bool

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

PySide6.QtGui.QTextFrame.iterator.currentBlock()#
Return type

PySide6.QtGui.QTextBlock

Returns the current block the iterator points to. If the iterator points to a child frame, the returned block is invalid.

See also

currentFrame()

PySide6.QtGui.QTextFrame.iterator.currentFrame()#
Return type

PySide6.QtGui.QTextFrame

Returns the current frame pointed to by the iterator, or None if the iterator currently points to a block.

See also

currentBlock()

PySide6.QtGui.QTextFrame.iterator.__ne__(o)#
Parameters

oPySide6.QtGui.QTextFrame.iterator

Return type

bool

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

PySide6.QtGui.QTextFrame.iterator.__iadd__()#
Return type

PySide6.QtGui.QTextFrame.iterator

Moves the iterator to the next frame or block.

See also

currentBlock() currentFrame()

PySide6.QtGui.QTextFrame.iterator.__iadd__(arg__1)
Parameters

arg__1 – int

Return type

PySide6.QtGui.QTextFrame.iterator

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

PySide6.QtGui.QTextFrame.iterator.__isub__()#
Return type

PySide6.QtGui.QTextFrame.iterator

Moves the iterator to the previous frame or block.

See also

currentBlock() currentFrame()

PySide6.QtGui.QTextFrame.iterator.__isub__(arg__1)
Parameters

arg__1 – int

Return type

PySide6.QtGui.QTextFrame.iterator

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

PySide6.QtGui.QTextFrame.iterator.__eq__(o)#
Parameters

oPySide6.QtGui.QTextFrame.iterator

Return type

bool

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

PySide6.QtGui.QTextFrame.iterator.parentFrame()#
Return type

PySide6.QtGui.QTextFrame

Returns the parent frame of the current frame.

See also

currentFrame() parentFrame()