En esta página

QTextFrame::iterator Class

class QTextFrame::iterator

La clase iterator proporciona un iterador para leer el contenido de un QTextFrame. Más...

Funciones públicas

iterator()
bool atEnd() const
QTextBlock currentBlock() const
QTextFrame *currentFrame() const
QTextFrame *parentFrame() const
bool operator!=(const QTextFrame::iterator &other) const
QTextFrame::iterator &operator++()
QTextFrame::iterator operator++(int)
QTextFrame::iterator &operator--()
QTextFrame::iterator operator--(int)
bool operator==(const QTextFrame::iterator &other) const

Descripción detallada

Un marco está formado por una secuencia arbitraria de QTextBlocks y QTextFrames hijos. Esta clase permite iterar sobre los objetos hijos de un marco y leer su contenido. No permite modificar el contenido del marco.

Documentación de las funciones miembro

[constexpr noexcept] iterator::iterator()

Construye un iterador inválido.

bool iterator::atEnd() const

Devuelve true si el elemento actual es el último elemento del marco de texto.

QTextBlock iterator::currentBlock() const

Devuelve el bloque actual al que apunta el iterador. Si el iterador apunta a un marco hijo, el bloque devuelto no es válido.

Véase también currentFrame().

QTextFrame *iterator::currentFrame() const

Devuelve el fotograma actual apuntado por el iterador, o nullptr si el iterador apunta actualmente a un bloque.

Véase también currentBlock().

QTextFrame *iterator::parentFrame() const

Devuelve el marco padre del marco actual.

Véase también currentFrame() y QTextFrame::parentFrame().

bool iterator::operator!=(const QTextFrame::iterator &other) const

Devuelve true si el iterador es diferente del iterador other; en caso contrario devuelve false.

QTextFrame::iterator &iterator::operator++()

Mueve el iterador al siguiente fotograma o bloque.

Véase también currentBlock() y currentFrame().

QTextFrame::iterator iterator::operator++(int)

El operador postfijo ++ (i++) avanza el iterador al siguiente elemento del marco de texto, y devuelve un iterador al elemento anterior.

QTextFrame::iterator &iterator::operator--()

Mueve el iterador al fotograma o bloque anterior.

Véase también currentBlock() y currentFrame().

QTextFrame::iterator iterator::operator--(int)

El operador postfijo -- (i--) convierte el elemento anterior en el marco actual, y devuelve un iterador al elemento anterior.

bool iterator::operator==(const QTextFrame::iterator &other) const

Devuelve true si el iterador es el mismo que el iterador other; en caso contrario devuelve false.

© 2026 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.