简体   繁体   中英

How to activate a WebGL streaming in matplotlib + PyQT5?

How to activate WebGl Streaming in PyQt?

I'm using matplotlib with PyQt5Agg backend. I installed last PyQt 5.12, python 3.6, Ubuntu 18, added -platform webgl:port=8998 as arguments, however nothing happens =(.

Any ideas? Thanks.

I am really not sure about the PyQt5Agg aspects nor matplotlib related stuff, as I am not sure it is openGL compatible.

For the rest, it is a matter of checking wether your have the right plugins installed, for instance, for me it is

ls venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/

returns

libqeglfs.so libqminimalegl.so libqoffscreen.so libqwayland-egl.so libqwayland-xcomposite-egl.so libqwebgl.so libqlinuxfb.so libqminimal.so libqvnc.so libqwayland-generic.so libqwayland-xcomposite-glx.so libqxcb.so

Now you can try:

QT_QPA_PLATFORM=webgl:port=8998 python ./test.py

Other environment variables might also help for debugging in general with Qt:

export QSG_INFO=1
export QT_QPA_EGLFS_DEBUG=1
export QT_LOGGING_RULES=qt.qpa.*=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM