While running program through the terminal we can stop the program by pressing \'Ctrl+c\' and it will show the message as \'KeyboardInterrupt\' . So, is there any way to do the
If your program is running a loop, you can call processEvents periodically to allow the gui time to update (which should allow you to click a button to close the application):
count = 0
while True:
count += 1
if not count % 50:
QtGui.qApp.processEvents()
# do stuff...