Obsolete Members for QJSValue

QJSValue クラスの以下のメンバーは非推奨となっています。これらは、古いソースコードが動作し続けるように提供されているものです。新しいコードでの使用は強く推奨しません。

パブリック関数

(deprecated in 6.9) bool isVariant() const

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

[deprecated in 6.9] bool QJSValue::isVariant() const

この関数はバージョン 6.9 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。

このQJSValue がバリアント値である場合はtrueを返し、そうでない場合はfalseを返します。

警告: この関数は 予期しない結果を返す可能性があります。バリアント値がQJSEngine によって生成されるのは、ごく限られたケースのみです。Qt 5.14以前では状況が異なり、QJSEngine::toScriptValue は対応するECMAScript型ではなく、より多くの型に対してバリアント値を生成していました。isVariant がfalseを返す多くの値については、toVariant を通じて有効なQVariant を取得できます。

toVariant()も参照してください 。

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