QtScript - separate contexts for separate scripts



  • Hello,
    I have a program where I look for .script files in a specific folder.
    For each file I then create a button that will load and evaluate the script.
    Now I would like that each script run in its own context, so that a variable declared in one script does not interfere with a variable of the same name in another script.
    I tried to use push and pop context but it seems it is not enough.
    @By default, the `this' object of the new context is the Global Object.@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.