このページでは

QVariant::Pointer Class

template <typename Indirect> class QVariant::Pointer

QVariant::Pointer は、QVariant への nononst ポインタをエミュレートするテンプレート・クラスです。詳細...

このクラスは Qt 6.11 で導入されました。

パブリック関数

Pointer(Indirect &&pointed)
Pointer(const Indirect &pointed)
operator QVariant::ConstPointer<Indirect>() const
QVariant::Reference<Indirect> operator*() const

詳細な説明

QVariant::Pointer ポインタされた値をラップし、operator*() からQVariant::Reference を返します。そのため、実際のポインタの代わりとして適しています。ジェネリック・イテレータは実際のポインタQVariant を保持しないので、ジェネリック・イテレータから実際のポインタを返すことはできません。

メンバ関数ドキュメント

[explicit noexcept(...)] Pointer::Pointer(Indirect &&pointed)

pointed からQVariant::Pointer を構築する。

注: std::is_nothrow_move_constructible_v<Indirect>true のとき、この関数は noexcept となる。

[explicit noexcept(...)] Pointer::Pointer(const Indirect &pointed)

pointed からQVariant::Pointer を構築する。

注: std::is_nothrow_copy_constructible_v<Indirect>true のとき、この関数は noexcept となる。

[noexcept(...)] Pointer::operator QVariant::ConstPointer<Indirect>() const

このQVariant::PointerQVariant::ConstPointer に変換する。

注意: この関数は、std::is_nothrow_copy_constructible_v<Indirect>true の場合は noexcept となる。

[noexcept(...)] QVariant::Reference<Indirect> Pointer::operator*() const

QVariant::PointerQVariant::Reference にデリファレンスする。

注意: この関数は、std::is_nothrow_copy_constructible_v<Indirect>true の場合は noexcept となる。

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