Important: Please read the Qt Code of Conduct -

Passing parameters to an external Qt Script

  • Hi,

    I'm new to using QtScript. I've read the "script docs": and managed to get a simple external "placeholder" script working. But what I really need to do with this script is to pass in a QBitArray and two integers. Despite reading the docs, I am lost on how to do this.

    My current script that takes no arguments is read using a QFile and QTextStream and placed into a QString, which is then used to construct a QScriptProgram. I call QScriptEngine::evaluate() on this QScriptProgram. But what do I do when I need to pass parameters to my script?

Log in to reply