Skip to content

Instantly share code, notes, and snippets.

@zed
Created January 26, 2018 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zed/7219ddf356e25bfd9527c2762729b5d3 to your computer and use it in GitHub Desktop.
Save zed/7219ddf356e25bfd9527c2762729b5d3 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
"""Demonstrate that without `sys.exit()` exit status is zero after `app.exit(1)`."""
import sys
from PyQt5.Qt import QApplication, QPushButton
app = QApplication(sys.argv)
w = QPushButton("Exit 1")
w.clicked.connect(lambda: app.exit(1))
w.show()
sys.exit(app.exec())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment