From f71e999c526d7d389509e32766e691d0d67d25c2 Mon Sep 17 00:00:00 2001 From: Christoph Stahl Date: Thu, 13 Feb 2025 13:59:55 +0100 Subject: [PATCH] Always import qt library before importing qasync for examples. --- README.md | 2 +- examples/qml_httpx/app.py | 2 +- examples/qml_httpx/service.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cd39b52..e49d3c6 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ If you need some CPU-intensive tasks to be executed in parallel, `qasync` also g import sys import asyncio -from qasync import QEventLoop, QApplication from PySide6.QtWidgets import QWidget, QVBoxLayout +from qasync import QEventLoop, QApplication class MainWindow(QWidget): def __init__(self): diff --git a/examples/qml_httpx/app.py b/examples/qml_httpx/app.py index f544cd9..3db55f8 100644 --- a/examples/qml_httpx/app.py +++ b/examples/qml_httpx/app.py @@ -2,9 +2,9 @@ import asyncio from pathlib import Path -from qasync import QEventLoop, QApplication from PySide6.QtCore import QUrl from PySide6.QtQml import QQmlApplicationEngine, qmlRegisterType +from qasync import QEventLoop, QApplication from service import ExampleService diff --git a/examples/qml_httpx/service.py b/examples/qml_httpx/service.py index 3c2604f..54de6ef 100644 --- a/examples/qml_httpx/service.py +++ b/examples/qml_httpx/service.py @@ -1,7 +1,7 @@ import httpx -from qasync import asyncSlot from PySide6.QtCore import QObject, Signal, Property, Slot +from qasync import asyncSlot class ExampleService(QObject):