In questa pagina

QTextFrame::iterator Class

class QTextFrame::iterator

La classe iteratore fornisce un iteratore per la lettura del contenuto di un QTextFrame. Per saperne di più...

Funzioni pubbliche

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

Descrizione dettagliata

Un frame è costituito da una sequenza arbitraria di oggetti ` QTextBlock` e di oggetti figli ` QTextFrame`. Questa classe fornisce un modo per iterare sugli oggetti figli di un frame e leggerne il contenuto. Non fornisce un modo per modificare il contenuto del frame.

Documentazione delle funzioni membro

[constexpr noexcept default] iterator::iterator()

Crea un iteratore non valido.

bool iterator::atEnd() const

Restituisce " true " se l'elemento corrente è l'ultimo elemento nel riquadro di testo.

QTextBlock iterator::currentBlock() const

Restituisce il blocco corrente a cui punta l'iteratore. Se l'iteratore punta a un frame figlio, il blocco restituito non è valido.

Vedi anche currentFrame().

QTextFrame *iterator::currentFrame() const

Restituisce il frame corrente a cui punta l'iteratore, oppure nullptr se l'iteratore punta attualmente a un blocco.

Vedi anche currentBlock().

QTextFrame *iterator::parentFrame() const

Restituisce il fotogramma padre del fotogramma corrente.

Vedi anche currentFrame() e QTextFrame::parentFrame().

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

Restituisce true se l'iteratore è diverso dall'iteratore " other "; in caso contrario, restituisce " false".

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

Sposta l'iteratore al fotogramma o al blocco successivo.

Vedi anche currentBlock() e currentFrame().

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

L'operatore postfisso ++ (i++) fa avanzare l'iteratore all'elemento successivo nel frame di testo e restituisce un iteratore che punta all'elemento precedente.

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

Sposta l'iteratore al fotogramma o al blocco precedente.

Vedi anche currentBlock() e currentFrame().

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

L'operatore postfisso -- (i--) crea l'elemento precedente nel frame corrente e restituisce un iteratore che punta al vecchio elemento.

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

Restituisce `true` se l'iteratore è lo stesso dell'iteratore ` other `; in caso contrario, restituisce ` 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.