iterator¶
The iterator class provides an iterator for reading the contents of a
QTextFrame
. More…
Synopsis¶
Functions¶
def
__eq__
(o)def
__iter__
()def
__ne__
(o)def
__next__
()def
atEnd
()def
currentBlock
()def
currentFrame
()def
operator++
(arg__1)def
operator--
(arg__1)def
parentFrame
()
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.
- class PySide2.QtGui.QTextFrame.iterator¶
PySide2.QtGui.QTextFrame.iterator(o)
- param o:
Constructs an invalid iterator.
- PySide2.QtGui.QTextFrame.iterator.__iter__()¶
- Return type:
object
- PySide2.QtGui.QTextFrame.iterator.__next__()¶
- Return type:
object
- PySide2.QtGui.QTextFrame.iterator.atEnd()¶
- Return type:
bool
Returns
true
if the current item is the last item in the text frame.
- PySide2.QtGui.QTextFrame.iterator.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()
- PySide2.QtGui.QTextFrame.iterator.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()
- PySide2.QtGui.QTextFrame.iterator.__ne__(o)¶
- Parameters:
- Return type:
bool
Retuns true if the iterator is different from the
other
iterator; otherwise returnsfalse
.
- PySide2.QtGui.QTextFrame.iterator.operator++(arg__1)
- Parameters:
arg__1 – int
- Return type:
The postfix ++ operator (
i++
) advances the iterator to the next item in the text frame, and returns an iterator to the old item.
- PySide2.QtGui.QTextFrame.iterator.operator--(arg__1)
- Parameters:
arg__1 – int
- Return type:
The postfix – operator (
i--
) makes the preceding item in the current frame, and returns an iterator to the old item.
- PySide2.QtGui.QTextFrame.iterator.__eq__(o)¶
- Parameters:
- Return type:
bool
Retuns true if the iterator is the same as the
other
iterator; otherwise returnsfalse
.
- PySide2.QtGui.QTextFrame.iterator.parentFrame()¶
- Return type:
Returns the parent frame of the current frame.
See also
currentFrame()
parentFrame()
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.