このページでは

QVariantConstPointer Class

ポインタに基づいて、QVariant への const ポインタをエミュレートします。詳細...

ヘッダー: #include <qvariant.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
以下のように: Qt 6.0
ステータス: 6.15まで

このクラスはバージョン 6.15 で非推奨となる予定です。

パブリック関数

QVariantConstPointer(QVariant variant)
QVariant operator*() const
const QVariant *operator->() const

詳細な説明

代わりに `QVariant::ConstPointer ` を使用してください。

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

メンバ関数のドキュメント

[explicit] QVariantConstPointer::QVariantConstPointer(QVariant variant)

variant からQVariantConstPointerを生成します。

QVariant QVariantConstPointer::operator*() const

QVariantConstPointer の参照を解除し、その内部のQVariant を取得します。

const QVariant *QVariantConstPointer::operator->() const

QVariant への const ポインタを返し、operator->() の規約に準拠します。

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