Compatibility Members for QVariant

The following members of class QVariantare part of the Qt compatibility layer. We advise against using them in new code.

Related Non-Members

bool qVariantCanConvert(const QVariant & value)
T qVariantValue(const QVariant & value)

Related Non-Members

bool qVariantCanConvert(const QVariant & value)

Returns true if the given value can be converted to the template type specified; otherwise returns false.

This function is equivalent to QVariant::canConvert(value).

Note: This function was provided as a workaround for MSVC 6 which did not support member template functions. It is advised to use the other form in new code.

See also QVariant::canConvert().

T qVariantValue(const QVariant & value)

Returns the given value converted to the template type T.

This function is equivalent to QVariant::value<T>(value).

Note: This function was provided as a workaround for MSVC 6 which did not support member template functions. It is advised to use the other form in new code.

See also QVariant::value() and qvariant_cast().