QVariantRef Class

template <typename Pointer> class QVariantRef

QVariantRef는 QVariant 에 대한 참조가 아닌 참조로 작동합니다.. ..

헤더: #include <QVariantRef>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
이후: Qt 6.0

공용 함수

QVariantRef(const Pointer *pointer)
QVariant operator QVariant() const
QVariantRef<Pointer> &operator=(QVariantRef<Pointer> &&value)
QVariantRef<Pointer> &operator=(const QVariant &value)
QVariantRef<Pointer> &operator=(const QVariantRef<Pointer> &value)

자세한 설명

일반 이터레이터는 각 단계에서 QVariant 를 실제로 인스턴스화하지 않으므로, operator*()로부터 에 대한 참조를 반환할 수 없습니다. QVariantRef는 QVariant 에 대한 실제 참조와 동일한 기능을 제공하지만 템플릿 매개변수로 지정된 포인터로 지원됩니다. 이 템플릿은 QSequentialIterator 및 QAssociativeIterator 유형의 포인터에 대해 구현됩니다.

멤버 함수 문서

[explicit] QVariantRef::QVariantRef(const Pointer *pointer)

pointer 에서 QVariantRef를 생성합니다.

QVariant QVariantRef::operator QVariant() const

QVariantRef 을 실제 QVariant 으로 확인합니다.

QVariantRef<Pointer> &QVariantRef::operator=(QVariantRef<Pointer> &&value)

QVariantRef 이 가리키는 포인터가 가리키는 값에 새 value 을 할당합니다.

QVariantRef<Pointer> &QVariantRef::operator=(const QVariant &value)

QVariantRef 이 가리키는 포인터가 가리키는 값에 새 value 을 할당합니다.

QVariantRef<Pointer> &QVariantRef::operator=(const QVariantRef<Pointer> &value)

QVariantRef 이 가리키는 포인터가 가리키는 값에 새 value 을 할당합니다.

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