QVariant::ConstReference Class
template <typename Indirect> class QVariant::ConstReferenceQVariant::ConstReference 은 QVariant 에 대한 const 참조 역할을 합니다.. ..
이 클래스는 Qt 6.11에 도입되었습니다.
공용 함수
| ConstReference(Indirect &&referred) | |
| ConstReference(QVariant::Reference<Indirect> &&nonConst) | |
| ConstReference(const Indirect &referred) | |
| ConstReference(const QVariant::Reference<Indirect> &nonConst) | |
| operator QVariant() const |
자세한 설명
일반 이터레이터는 각 단계에서 QVariant 를 실제로 인스턴스화하지 않기 때문에, 연산자*()로부터 참조를 반환할 수 없습니다. QVariant::ConstReference 은 QVariant 에 대한 실제 참조와 동일한 기능을 제공하지만, 템플릿 매개변수로 주어진 참조값이 뒷받침됩니다. 이 템플릿은 QMetaSequence::ConstIterator, QMetaSequence::Iterator, QMetaAssociation::ConstIterator, QMetaAssociation::Iterator에 대해 구현되어 있습니다.
멤버 함수 문서
[explicit noexcept(...)] ConstReference::ConstReference(Indirect &&referred)
referred 에서 QVariant::ConstReference 을 만듭니다.
참고: 이 함수는 std::is_nothrow_move_constructible_v<Indirect> 가 true 인 경우를 제외하고는 작동하지 않습니다.
[default] ConstReference::ConstReference(QVariant::Reference<Indirect> &&nonConst)
nonConst 참조에서 QVariant::ConstReference 을 만듭니다.
[explicit noexcept(...)] ConstReference::ConstReference(const Indirect &referred)
referred 에서 QVariant::ConstReference 을 만듭니다.
참고: 이 함수는 std::is_nothrow_copy_constructible_v<Indirect> 가 true 인 경우를 제외하고는 작동하지 않습니다.
[noexcept(...)] ConstReference::ConstReference(const QVariant::Reference<Indirect> &nonConst)
nonConst 참조에서 QVariant::ConstReference 을 생성합니다.
참고: 이 함수는 std::is_nothrow_copy_constructible_v<Indirect> 가 true 인 경우를 제외하고는 작동하지 않습니다.
[noexcept(...)] ConstReference::operator QVariant() const
QVariant 에 대한 참조를 역참조합니다. 이 메서드는 각 간접 유형에 맞게 특화해야 합니다. 이 메서드는 QMetaSequence::ConstIterator, QMetaSequence::Iterator, QMetaAssociation::ConstIterator, QMetaAssociation::Iterator에 대해 미리 정의되어 있습니다.
참고: 이 함수는 Indirect::CanNoexceptConvertToQVariant 가 true 일 때를 제외하고는 작동하지 않습니다.
© 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.