Unhide console on Windows right before exit (we don't want to leave zombies behind)
This commit is contained in:
parent
c140e9313e
commit
c6e305343c
@ -632,10 +632,10 @@ def main():
|
||||
args, unparsed_args = parser.parse_known_args()
|
||||
debug = args.debug
|
||||
|
||||
try:
|
||||
# Hide console window on Windows
|
||||
if sys.platform == 'win32' and not debug:
|
||||
from qspectrumanalyzer import windows
|
||||
if windows.is_attached_console_visible():
|
||||
windows.set_attached_console_visible(False)
|
||||
|
||||
# Start PyQt application
|
||||
@ -645,6 +645,10 @@ def main():
|
||||
app.setApplicationName("QSpectrumAnalyzer")
|
||||
window = QSpectrumAnalyzerMainWindow()
|
||||
sys.exit(app.exec_())
|
||||
finally:
|
||||
# Unhide console window on Windows (we don't want to leave zombies behind)
|
||||
if sys.platform == 'win32' and not debug:
|
||||
windows.set_attached_console_visible(True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user