aboutsummaryrefslogtreecommitdiffstats
path: root/examples/async/eratosthenes/eratosthenes_asyncio.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/async/eratosthenes/eratosthenes_asyncio.py')
-rw-r--r--examples/async/eratosthenes/eratosthenes_asyncio.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/async/eratosthenes/eratosthenes_asyncio.py b/examples/async/eratosthenes/eratosthenes_asyncio.py
index f63058cdf..a5177a94b 100644
--- a/examples/async/eratosthenes/eratosthenes_asyncio.py
+++ b/examples/async/eratosthenes/eratosthenes_asyncio.py
@@ -132,7 +132,7 @@ class AsyncHelper(QObject):
asyncio to resume when the event is handled. event.fn() is
the next entry point of the asyncio event loop. """
def event(self, event):
- if event.type() == QEvent.User + 1:
+ if event.type() == QEvent.Type.User + 1:
event.fn()
return True
return False
@@ -141,7 +141,7 @@ class AsyncHelper(QObject):
""" This is the QEvent that will be handled by the ReenterQtObject.
self.fn is the next entry point of the asyncio event loop. """
def __init__(self, fn):
- super().__init__(QEvent.Type(QEvent.User + 1))
+ super().__init__(QEvent.Type(QEvent.Type.User + 1))
self.fn = fn
def __init__(self, worker, entry):