QScriptValue intValue = QScriptValue(42);
QScriptValue stringValue = QScriptValue("Hello, World!");
QScriptValue arrayValue = engine.newArray(3); arrayValue.setProperty(0, QScriptValue(1)); arrayValue.setProperty(1, QScriptValue(2)); arrayValue.setProperty(2, QScriptValue(3));This code creates a QScriptValue object called arrayValue and initializes it with an array of three integers. It uses the engine's newArray() function to create the array, and then sets the array values using the setProperty() function. Package Library: QtCore (part of the Qt framework)