Replies: 1 comment
|
There are multiple ways of doing this of course, What solution you prefer depends on how you design and use Qt and object-orientation in general. However, a simply dirty way it so put a wait before and then call |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
There is a part of python script as follows, these functions call C++ functions.
GenerateMesh start external QProcess to do real task, then return immediatly. It's async. There is another function reciving QProcess::finished signal to do some other work.
CloseProject closes the program.
This design has a fatal problem. GenerateMesh is async, CloseProject is invoked, at this point, the child process is not finished.
A possible solution is move all python operation to subthread, and make GeneratorMesh synchronous. but other function do a lot of UI operation.
Is there a proper way to block or pause python running?
All reactions