aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAdrian Herrmann <adrian.herrmann@qt.io>2024-04-23 17:26:56 +0200
committerAdrian Herrmann <adrian.herrmann@qt.io>2024-04-24 13:32:41 +0200
commit0f01e3910b115e4ae48e01eaa0927e42f50180fa (patch)
treefd20876ba0df849196cb659f12d7c5610b8bf5f7 /examples
parent29136f0186d5f281f751c8974ae888913e5d765a (diff)
QtAsyncio: Let examples handle SIGINT
Make the two QtAsyncio examples handle the Ctrl + C interrupt for a more natural user experience. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: I1dd87227fd1f1b70684476087f776ccc82da9571 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/async/eratosthenes/eratosthenes_asyncio.py2
-rw-r--r--examples/async/minimal/minimal_asyncio.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/async/eratosthenes/eratosthenes_asyncio.py b/examples/async/eratosthenes/eratosthenes_asyncio.py
index 598d9b4bd..c5d7fc2fe 100644
--- a/examples/async/eratosthenes/eratosthenes_asyncio.py
+++ b/examples/async/eratosthenes/eratosthenes_asyncio.py
@@ -131,4 +131,4 @@ if __name__ == "__main__":
main_window.show()
- QtAsyncio.run(eratosthenes.start())
+ QtAsyncio.run(eratosthenes.start(), handle_sigint=True)
diff --git a/examples/async/minimal/minimal_asyncio.py b/examples/async/minimal/minimal_asyncio.py
index 1b72f44c1..a6c4708b3 100644
--- a/examples/async/minimal/minimal_asyncio.py
+++ b/examples/async/minimal/minimal_asyncio.py
@@ -37,4 +37,4 @@ if __name__ == "__main__":
main_window = MainWindow()
main_window.show()
- QtAsyncio.run()
+ QtAsyncio.run(handle_sigint=True)