QScriptValue::toVariant can turn basic string and number types, as well as arrays and objects (associative arrays), into a QVariant.
There doesn’t seem to be any corresponding way to construct a QScriptValue from a QVariant.
Is it hiding, or missing?
http://qt-project.org/doc/qt-5/qscriptengine.html#newVariant