[Interest] QJSValue & QVariant

Gav Wood qtinterest at gavwood.com
Tue Apr 8 16:50:55 CEST 2014


Hi,

QVariant is able to store opaque (non-QObject) user-defined types.

It seems from the documentation that QJSValue is able to store
QVariants, however though there is QJSValue::isVariant() ad
QJSValue::toVariant(), there is no method or function that is able to
create a QJSValue from a QVariant. Am I to conclude that QJSValue
cannot, in general, be used to store and pass around (within a
Javascript environment) opaque user types?

Gav.



More information about the Interest mailing list