From a83482740b9dbc5703bf3a4b15a606a719117848 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Sun, 21 Apr 2019 15:16:20 +0200 Subject: [PATCH] now it is possible to close from command line --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 0a09b10..992bb00 100755 --- a/main.py +++ b/main.py @@ -11,6 +11,7 @@ import pickle import time import keyboard import threading +import signal class MainWnd(QWidget): def __init__(self, p_parent = None): @@ -26,6 +27,7 @@ class MainWnd(QWidget): self.ui.listeningChk.stateChanged.connect(self.slotListeningEnabled) self.ui.ok.clicked.connect(self.slotOK) self.ui.cancel.clicked.connect(self.slotCancel) + signal.signal(signal.SIGINT, signal.SIG_DFL) if self.loadFromDatabase() > 0 : # if self.loadTestProfiles() > 0: