python - Using sys.exit() with app.exec_ in pyqt -


Can anyone explain the relative properties of using sys.exit (app.exec _ ()) But to start a GUI in PyQt, simple from app.exec _ () ?

I am new to PyQt and I have seen both examples.

When exits from the Unix-style application, which is called 'status code' or 'exit status' goes. 0 is used to indicate success; Nothing is non-zero failure. (Some attempts have been made, but it is still generally abandoned for each program.)

sys.exit (n) saves your application and returns the original n to the original process (usually your shell). So the difference is, when you exit the program, the longer version passes on the status code. It is better to use sys.exit (app.exec _ ()) because it can detect other parts of the system when your program is out of error.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -