Marc Nations wrote:
Why are you calling the exec_() function from inside the sys.exit() call?

From the way it's programmed, it looks like sys.exit() will execute and hold until it gets a result back from the MessageBox called inside the tray icon. At that point it's going to exit using the result as it's argument. If you just select 'OK' then the MessageBox returns a 0, which will then cause a normal termination the program (exit code 0).
Actually, if you click OK, message box returns 1024. Which is the value of the enum of StandardButton. So you're seeing normal termination, but if the Ok button were the result, then the exit code would be 1024. It will return the error code based on what the application returns, not the messagebox.

darryl
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to