Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Passing parameters to an external Qt Script

    General and Desktop
    1
    1
    315
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Benk10 last edited by

      Hi,

      I'm new to using QtScript. I've read the "script docs":http://doc.qt.io/qt-5/qtscript-index.html 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?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post