Handle interruption signal in example
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
+import signal
from Qt import QtCore, QtWidgets
@@ -20,6 +21,9 @@ from examples.custom_nodes import (
)
if __name__ == '__main__':
+ # handle SIGINT to make the app terminate on CTRL+C
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
+
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
app = QtWidgets.QApplication([])
