En esta página

QIterable Class

template <typename Container> class QIterable

QIterable es una clase de plantilla que es la clase base para QMetaSequence::Iterable y QMetaAssociation::Iterable. Más...

Cabecera: #include <QIterable>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Desde: Qt 6.0
Heredado por:

QAssociativeIterable y QSequentialIterable

Funciones Públicas

bool canForwardIterate() const
bool canInputIterate() const
bool canRandomAccessIterate() const
bool canReverseIterate() const
void clear()
QConstIterator<Container> constBegin() const
QConstIterator<Container> constEnd() const
QIterator<Container> mutableBegin()
QIterator<Container> mutableEnd()
qsizetype size() const

Descripción Detallada

Documentación de las funciones de los miembros

bool QIterable::canForwardIterate() const

Devuelve si es posible iterar sobre el contenedor en dirección hacia adelante. Corresponde al rasgo iterador std::forward_iterator_tag del iterador y const_iterator del contenedor.

bool QIterable::canInputIterate() const

Devuelve si el contenedor tiene un iterador de entrada. Corresponde al rasgo iterador std::input_iterator_tag del iterador y const_iterator del contenedor.

bool QIterable::canRandomAccessIterate() const

Devuelve si es posible saltar eficientemente sobre múltiples valores utilizando un iterador. Corresponde al rasgo iterador std::random_access_iterator_tag del iterador y const_iterator del contenedor.

bool QIterable::canReverseIterate() const

Devuelve si es posible iterar sobre el contenedor en sentido inverso. Corresponde al rasgo iterador std::bidirectional_iterator_tag del const_iterator del contenedor.

void QIterable::clear()

Borra el contenedor.

QConstIterator<Container> QIterable::constBegin() const

Devuelve un QConstIterator para el comienzo del contenedor. Puede utilizarse en la iteración al estilo stl.

Véase también constEnd() y mutableBegin().

QConstIterator<Container> QIterable::constEnd() const

Devuelve un Qterable::QConstIterator para el final del contenedor. Esto puede ser usado en iteración estilo stl.

Véase también constBegin() y mutableEnd().

QIterator<Container> QIterable::mutableBegin()

Devuelve un QIterator para el comienzo del contenedor. Puede utilizarse en la iteración al estilo stl.

Véase también mutableEnd() y constBegin().

QIterator<Container> QIterable::mutableEnd()

Devuelve un iterador QMetaSequence::Iterable::para el final del contenedor. Esto se puede utilizar en la iteración de estilo stl.

Véase también mutableBegin() y constEnd().

qsizetype QIterable::size() const

Devuelve el número de valores del contenedor.

Nota: Si el contenedor subyacente no proporciona una forma nativa de consultar el tamaño, este método sintetizará el acceso utilizando iteradores. Este comportamiento está obsoleto y será eliminado en una futura versión de Qt.

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