Skip to content

Always import qt library before importing qasync for examples. #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2025

Conversation

christofsteel
Copy link
Contributor

qasync guesses the python qt wrapper it injects itself into, based on the already loaded module or (if no module is available) on the installed python qt wrapper. The latter approach is a good backup, but can lead to errors, when multiple wrappers are installed.

From what I've gathered, importing qasync after the respective qt wrapper is the preferred way to determine the wrapper to use, so examples should reflect this, to avoid usage errors such as christofsteel/syng#8 (comment) 😅

@hosaka
Copy link
Collaborator

hosaka commented Jul 23, 2025

Agreed, this is easier to understand rather than having to look through the implementation to find out that you can use QT_API env var or the order of Qt module look up.

@hosaka hosaka merged commit e614348 into CabbageDevelopment:master Jul 23, 2025
johnzhou721 pushed a commit to johnzhou721/qasync that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants