QVariantRef Class
template <typename Pointer> class QVariantRefQVariantRefは、QVariant へのconstでない参照として機能する。
ヘッダー | #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.