QAssociativeIterable Class
QAssociativeIterable 클래스는 연관 컨테이너( QVariant)를 위한 반복 가능 인터페이스입니다. 더 보기...
| 헤더: | #include <QAssociativeIterable> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| 상속: | QIterable |
| 상태: | 6.15까지 |
이 클래스는 버전 6.15에서 사용 중단될 예정입니다.
공개 유형
| BidirectionalConstIterator | |
| BidirectionalIterator | |
| ForwardConstIterator | |
| ForwardIterator | |
| InputConstIterator | |
| InputIterator | |
| RandomAccessConstIterator | |
| RandomAccessIterator | |
(until 6.15) | const_iterator |
(since 6.0, until 6.15) | iterator |
공개 함수
| bool | containsKey(const QVariant &key) |
| QAssociativeIterable::const_iterator | find(const QVariant &key) const |
| void | insertKey(const QVariant &key) |
| QAssociativeIterable::iterator | mutableFind(const QVariant &key) |
| void | removeKey(const QVariant &key) |
| void | setValue(const QVariant &key, const QVariant &mapped) |
| QVariant | value(const QVariant &key) const |
자세한 설명
대신 ` QMetaAssociation::Iterable `을 사용하십시오.
이 클래스는 ` QVariant` 내에 포함된 연관 컨테이너의 요소에 접근하는 여러 가지 방법을 제공합니다. ` QVariant `에서 `QAssociativeIterable` 인스턴스를 추출할 수 있는 경우는, 해당 ` `이 ` QVariantHash ` 또는 ` QVariantMap `로 변환될 수 있거나, 사용자 정의 가변 뷰가 등록된 경우입니다.
컨테이너 자체는 반복 처리를 시작하기 전에 복사되지 않습니다.
QVariant도 참조하십시오 .
멤버 유형 문서
[alias] QAssociativeIterable::BidirectionalConstIterator
std::bidirectional_iterator_tag를 사용하여 const_iterator 를 노출합니다.
[alias] QAssociativeIterable::BidirectionalIterator
std::bidirectional_iterator_tag를 사용하여 반복자를 노출합니다.
[alias] QAssociativeIterable::ForwardConstIterator
std::forward_iterator_tag를 사용하여 const_iterator 를 노출합니다.
[alias] QAssociativeIterable::ForwardIterator
std::forward_iterator_tag를 사용하여 반복자를 노출합니다.
[alias] QAssociativeIterable::InputConstIterator
std::input_iterator_tag를 사용하여 const_iterator 를 노출합니다.
[alias] QAssociativeIterable::InputIterator
std::input_iterator_tag를 사용하여 반복자를 노출합니다.
[alias] QAssociativeIterable::RandomAccessConstIterator
std::random_access_iterator_tag를 사용하여 const_iterator 를 노출합니다.
[alias] QAssociativeIterable::RandomAccessIterator
std::random_access_iterator_tag를 사용하여 반복자를 노출합니다.
[alias, until 6.15] QAssociativeIterable::const_iterator
이 typedef는 버전 6.15에서 사용 중단될 예정입니다.
대신 ` QMetaAssociation::Iterable::ConstIterator `를 사용하십시오.
QAssociativeIterable::const_iterator를 사용하면 QVariant 에서 컨테이너를 순회할 수 있습니다.
QAssociativeIterable::const_iterator는 QAssociativeIterable 인스턴스에 의해서만 생성될 수 있으며, 다른 STL 스타일의 반복자와 유사한 방식으로 사용할 수 있습니다.
QAssociativeIterable도 참조하십시오 .
[alias, since 6.0, until 6.15] QAssociativeIterable::iterator
이 typedef는 버전 6.15에서 사용 중단될 예정입니다.
대신 ` QMetaAssociation::Iterable::Iterator `를 사용하십시오.
QAssociativeIterable::iterator를 사용하면 QVariant 내의 컨테이너를 순회할 수 있습니다.
QAssociativeIterable::iterator는 QAssociativeIterable 인스턴스에 의해서만 생성될 수 있으며, 다른 STL 스타일의 이터레이터와 유사한 방식으로 사용할 수 있습니다.
이 typedef는 Qt 6.0에서 도입되었습니다.
QAssociativeIterable도 참조하십시오 .
멤버 함수 문서
bool QAssociativeIterable::containsKey(const QVariant &key)
컨테이너에 지정된 ` key` 값을 가진 항목이 있으면 ` true `를 반환하고, 그렇지 않으면 ` false `를 반환합니다. ` key `가 예상된 유형으로 변환할 수 없는 경우 ` false `가 반환됩니다.
QAssociativeIterable::const_iterator QAssociativeIterable::find(const QVariant &key) const
지정된 key 에 있는 요소를 가리키는 const_iterator 를 반환하거나, 해당 키가 존재하지 않을 경우 컨테이너의 끝을 반환합니다. key 가 예상된 유형으로 변환할 수 없는 경우, 컨테이너의 끝이 반환됩니다.
void QAssociativeIterable::insertKey(const QVariant &key)
지정된 ` key`을 사용하여 새 항목을 삽입하거나, 지정된 ` key `을 가진 기존 항목의 매핑된 값을 기본 생성된 매핑된 값으로 재설정합니다. ` key `는 예상되는 유형으로 강제 변환됩니다. 변환할 수 없는 경우 기본값이 삽입됩니다.
QAssociativeIterable::iterator QAssociativeIterable::mutableFind(const QVariant &key)
지정된 키( key)에 해당하는 요소를 가리키는 반복자를 반환하며, 해당 키가 존재하지 않을 경우 컨테이너의 끝을 반환합니다. 키( key )가 예상되는 유형으로 변환될 수 없는 경우, 컨테이너의 끝이 반환됩니다.
void QAssociativeIterable::removeKey(const QVariant &key)
지정된 ` key `을 가진 항목을 컨테이너에서 제거합니다. ` key `은 예상되는 유형으로 강제 변환됩니다. 변환이 불가능한 경우, 기본값이 제거됩니다.
void QAssociativeIterable::setValue(const QVariant &key, const QVariant &mapped)
가능한 경우, ` key `에 연결된 매핑된 값을 ` mapped`로 설정합니다. 주어진 ` key`에 대한 항목이 아직 존재하지 않으면 새 항목을 삽입합니다. ` key `가 키 유형으로 변환할 수 없는 경우, 기본 생성된 키 유형의 값이 덮어쓰입니다.
value()도 참조하십시오 .
QVariant QAssociativeIterable::value(const QVariant &key) const
지정된 ` key`에 매핑된 값을 반환하거나, 키가 존재하지 않을 경우 매핑된 유형의 기본 생성된 ` QVariant `를 반환합니다. ` key `가 키 유형으로 변환될 수 없는 경우, 기본 생성된 키와 연관된 매핑된 값이 반환됩니다.
setValue()도 참조하십시오 .
© 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.