以下成員源於類 QJSValue 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(deprecated in 6.9)
bool
|
isVariant () const |
[deprecated in 6.9]
bool
QJSValue::
isVariant
() const
This function is deprecated since 6.9. We strongly advise against using it in new code.
返迴 true,若此 QJSValue is a variant value; otherwise returns false.
警告:
This function is likely to give unexpected results. A variant value is only constructed by the
QJSEngine
in a very limited number of cases. This used to be different before Qt 5.14, where
QJSEngine::toScriptValue
would have created them for more types instead of corresponding ECMAScript types. You can get a valid
QVariant
憑藉
toVariant
for many values for which
isVariant
returns false.
另請參閱 toVariant ().