|  | Home · All Classes · Modules

# QTextFrame.iterator Class Reference
[QtGui module]

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

### Methods

- __init__ (self)
- __init__ (self, iterator)
- bool atEnd (self)
- QTextBlock currentBlock (self)
- QTextFrame currentFrame (self)
- QTextFrame parentFrame (self)

### Special Methods

- bool __eq__ (self, iterator)
- iterator __iadd__ (self, int)
- iterator __isub__ (self, int)
- bool __ne__ (self, iterator)

## Detailed Description

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

A frame consists of an arbitrary sequence of QTextBlocks and child QTextFrames. 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.

## Method Documentation

### iterator.__init__ (self)

Constructs an invalid iterator.

### iterator.__init__ (self, iterator)

### bool iterator.atEnd (self)

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

### QTextBlock iterator.currentBlock (self)

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

See also currentFrame().

### QTextFrame iterator.currentFrame (self)

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

See also currentBlock().

### QTextFrame iterator.parentFrame (self)

Returns the parent frame of the current frame.

See also currentFrame() and QTextFrame.parentFrame().

### bool iterator.__eq__ (self, iterator)

### iterator iterator.__iadd__ (self, int)

### iterator iterator.__isub__ (self, int)

### bool iterator.__ne__ (self, iterator)