How to evaluate a script with a base class
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Hello there
We already succeeded in calling a python script.
In the script "TestScript01.py" we defined a class TestScript.
So we first evaluate the script by calling
PythonQtObjectPtr mainModule = PythonQt::self()->getMainModule();
mainModule->evalFile("TestScript01.py");
PythonQtObjectPtr testClass = mainModule.evalScript("TestScript()\n", Py_eval_input);
Now we changed our script. Our class TestScript inherits from a new class Test Base in file TestBase.py.
When we start the system we now get
"NameError"
": "
"name 'TestBase' is not defined"
What can we do to let PythonQt know about our new base class?
I would be glad for any kind of help.
Thank you very much
Frank Thomas
Just a short hint: We reposted this issue in the Help-Forum. If anyone is interested in the answer… you can find it there. :)