PySide6.QtGui.QTextFrame.iterator¶
- class iterator¶
The iterator class provides an iterator for reading the contents of a
QTextFrame
. More…Synopsis¶
Methods¶
def
__init__()
def
__iter__()
def
__next__()
def
atEnd()
def
currentBlock()
def
currentFrame()
def
__ne__()
def
__iadd__()
def
__isub__()
def
__eq__()
def
parentFrame()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
A frame consists of an arbitrary sequence of
QTextBlock
s and childQTextFrame
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.- __init__()¶
Constructs an invalid iterator.
- __iter__()¶
- Return type:
object
- __next__()¶
- Return type:
object
- atEnd()¶
- Return type:
bool
Returns
true
if the current item is the last item in the text frame.- currentBlock()¶
- Return type:
Returns the current block the iterator points to. If the iterator points to a child frame, the returned block is invalid.
See also
currentFrame()
- currentFrame()¶
- Return type:
Returns the current frame pointed to by the iterator, or
None
if the iterator currently points to a block.See also
currentBlock()
- __ne__(o)¶
- Parameters:
o –
iterator
- Return type:
bool
Returns true if the iterator is different from the
other
iterator; otherwise returnsfalse
.- __iadd__()¶
- Return type:
iterator
Moves the iterator to the next frame or block.
See also
currentBlock()
currentFrame()
- __iadd__(arg__1)
- Parameters:
arg__1 – int
- Return type:
iterator
The postfix
++
operator (i++
) advances the iterator to the next item in the text frame, and returns an iterator to the old item.- __isub__()¶
- Return type:
iterator
Moves the iterator to the previous frame or block.
See also
currentBlock()
currentFrame()
- __isub__(arg__1)
- Parameters:
arg__1 – int
- Return type:
iterator
The postfix
--
operator (i--
) makes the preceding item in the current frame, and returns an iterator to the old item.- __eq__(o)¶
- Parameters:
o –
iterator
- Return type:
bool
Returns true if the iterator is the same as the
other
iterator; otherwise returnsfalse
.- parentFrame()¶
- Return type:
Returns the parent frame of the current frame.
See also
currentFrame()
parentFrame()