-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error using Wayland and Qt #120
Comments
Thanks for reporting this and even providing a solution! For reference, one can detect Wayland like this: So we could add some code that applies the environment changes in this case. Though it might be that the environment will have to be set before importing Qt, in which case it's better to leave this up to the user ... |
I agree with not putting it into the code of visvis, but leave the decision to the user. Probably a note in the wiki might be the best place to to put some note about wayland. |
Added a note here: https://github.com/almarklein/visvis/wiki/Installation edit: will also add a note in the FAQ |
I recently added the glfw backend, which also has Wayland support. Last time I tested (the code was copied from wgpu-py) Wayland support was not perfect, but maybe better than Pyside? |
Hello,
I recently switched to Wayland and noticed that visvis was not working within a QtWidget (using Qt 5.15.2, wayland 1.19.0 and visvis's pyside2 backend). It does not crash, but it produced some transparent canvas in the Qt application and printed the following error:
I didn't had a deeper look into the error, but found the following workaround: Qt will fallback to X11/Wayland if WAYLAND_DISPLAY and QT_QPA_PLATFORM are unset. This can be done by calling the script using
env WAYLAND_DISPLAY="" QT_QPA_PLATFORM="" python ...
or directly enforcing this in the code itself before importing Qt:
Maybe this helps if somebody gets the same error.
For completeness, here a small script that reproduced the error
having
WAYLAND_DISPLAY=wayland-0
andQT_QPA_PLATFORM=wayland
Best
sleepywitti
The text was updated successfully, but these errors were encountered: