이 페이지에서

QMetaSequence::Iterable::ConstIterator Class

class QMetaSequence::Iterable::ConstIterator

QMetaSequence::Iterable::ConstIterator 에서 컨테이너에 대한 반복을 허용합니다 QVariant.. . 더보기...

이 클래스는 Qt 6.11에 도입되었습니다.

공용 함수

QVariant operator*() const
int operator->() const
QVariant operator[](qsizetype n) const

상세 설명

QMetaSequence::Iterable::ConstIterator 인스턴스는 QMetaSequence::Iterable 인스턴스만 만들 수 있으며 다른 stl 스타일 이터레이터와 유사한 방식으로 사용할 수 있습니다.

QList<int> intList = {7, 11, 42};QVariant variant = QVariant::fromValue(intList);if (variant.canConvert<QVariantList>()) { QMetaSequence::이터러블 이터러블 = variant.value<QMetaSequence::Iterable>(); // C++11 range-for 사용 가능: for(const QVariant &v: 이터러블) {        qDebug() << v;
    } // 이터레이터를 사용할 수 있습니다:    QMetaSequence::Iterable::const_iterator it = iterable.begin(); const QMetaSequence::Iterable::const_iterator end = iterable.end(); for ( ; it != end; ++it) {        qDebug() << *it;
    } }

멤버 함수 문서

QVariant ConstIterator::operator*() const

현재 항목을 QVariant 로 변환하여 반환합니다.

int ConstIterator::operator->() const

현재 항목을 QVariant::ConstPointer 로 변환하여 반환합니다.

QVariant ConstIterator::operator[](qsizetype n) const

현재 항목에서 오프셋을 n 으로 변환하여 QVariant 으로 반환합니다.

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