Hi,

I use QJSEngine and I want to add to the engine a method with variable arguments number.

I have added methods of C++ class "CustomScripts" with this code and it works fine, I can call myFunction.
Qt Code:
  1. CustomScripts * scriptObject = new CustomScripts;
  2. QJSValue scriptTest = myQJSEngine->newQObject(scriptObject);
  3. QJSValue aFunction = scriptTest.property("myFunction");
  4. myQJSEngine->globalObject().setProperty("myFunction", aFunction);
To copy to clipboard, switch view to plain text mode 
But exposed methods take only 1 or 2 arguments.

I try to use QVariantList to pass variable argument number but it only work for javascript array.
How can I do that ?