Auf dieser Seite

QTextFrame::iterator Class

class QTextFrame::iterator

Die Iterator-Klasse stellt einen Iterator zum Auslesen des Inhalts eines „ QTextFrame “ bereit. Mehr...

Öffentliche Funktionen

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

Ausführliche Beschreibung

Ein Frame besteht aus einer beliebigen Abfolge von „ QTextBlock“ und untergeordneten „ QTextFrame“. Diese Klasse bietet eine Möglichkeit, die untergeordneten Objekte eines Frames zu durchlaufen und deren Inhalt zu lesen. Sie bietet keine Möglichkeit, den Inhalt des Frames zu ändern.

Dokumentation der Mitgliedsfunktionen

[constexpr noexcept default] iterator::iterator()

Erstellt einen ungültigen Iterator.

bool iterator::atEnd() const

Gibt „ true “ zurück, wenn das aktuelle Element das letzte Element im Textrahmen ist.

QTextBlock iterator::currentBlock() const

Gibt den aktuellen Block zurück, auf den der Iterator zeigt. Wenn der Iterator auf einen untergeordneten Frame zeigt, ist der zurückgegebene Block ungültig.

Siehe auch ` currentFrame()`.

QTextFrame *iterator::currentFrame() const

Gibt den aktuellen Frame zurück, auf den der Iterator zeigt, oder „ nullptr “, falls der Iterator derzeit auf einen Block zeigt.

Siehe auch ` currentBlock()`.

QTextFrame *iterator::parentFrame() const

Gibt den übergeordneten Frame des aktuellen Frames zurück.

Siehe auch currentFrame() und QTextFrame::parentFrame().

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

Gibt „true“ zurück, wenn sich der Iterator vom Iterator „ other “ unterscheidet; andernfalls wird „ false “ zurückgegeben.

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

Springt mit dem Iterator zum nächsten Frame oder Block.

Siehe auch „ currentBlock()“ und „ currentFrame()“.

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

Der Postfix- ++ -Operator (i++) verschiebt den Iterator zum nächsten Element im Textrahmen und gibt einen Iterator auf das vorherige Element zurück.

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

Bewegt den Iterator zum vorherigen Frame oder Block.

Siehe auch „ currentBlock()“ und „ currentFrame()“.

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

Der Postfix-Operator „ -- “ (i--) macht das vorangehende Element zum aktuellen Frame-Element und gibt einen Iterator auf das alte Element zurück.

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

Gibt „true“ zurück, wenn der Iterator mit dem Iterator „ other “ übereinstimmt; andernfalls wird „ false “ zurückgegeben.

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