wookoon
8th June 2010, 11:01
I wondering how to access an (QScript) array from C++.
We can use QScriptValue::isArray() to determine if the value is an array or not. Unfortunately, it doesn’t really
state there how to access contents of the array.My initial reaction was to just convert the value to a
QVariant (using toVariant()) and then convert the variant to a QVariantList (toList()). That didn’t quite work.
We can use QScriptValue::isArray() to determine if the value is an array or not. Unfortunately, it doesn’t really
state there how to access contents of the array.My initial reaction was to just convert the value to a
QVariant (using toVariant()) and then convert the variant to a QVariantList (toList()). That didn’t quite work.