CabbageDevelopment / qasync

Python library for using asyncio in Qt-based applications.
BSD 2-Clause "Simplified" License
307 stars 43 forks source link

Basic example crashes when running without venv. #120

Open HubKing opened 2 months ago

HubKing commented 2 months ago

Python version is 3.11.8-1. Arch Linux, Plasma 6.0.4, kernel 6.8.7. pyside6 6.7.0-3 and python-qasync 0.24.0-2 are installed from the official repository. If I run the "basic example" as it is, other than adding missing imports like

import sys
import asyncio

from qasync import QEventLoop, QApplication, asyncClose, asyncSlot
from PySide6.QtWidgets import QWidget, QVBoxLayout, QLabel

It crashes.

QWidget: Must construct a QApplication before a QWidget
Aborted (core dumped)

I created a venv that inherits system packages, removed system qasync, and installed only qasync in the venv. It crashed in the same way.

I created a venv without inheritance and installed only qasync and pyside6. This time, it worked.