Hi
I try to run heavy calculation by qtimer
cmd = “pythonSlicerExecutablePath=os.path.dirname(sys.executable)+‘/PythonSlicer.exe’\n”
“commandLine = [pythonSlicerExecutablePath, script, ‘%1’]\n”
“proc=slicer.util.launchConsoleProcess( commandLine ,useStartupEnvironment=True)\n”
…
PythonQt::init();
PythonQtObjectPtr context = PythonQt::self()->getMainModule();
QTimer timer;
timer.singleShot(0,this, & {
context.evalScript(cmd);
});
the set a progressbar for main thread.
but it cashed with PythonQt accession error
Any suggestion vill very appreciated