Y
Y
yong2019-05-28 15:45:05
Python
yong, 2019-05-28 15:45:05

How to enable WebGL on QWebEngineView?

I'm trying to enable it with the following code:

self.browser = QWebEngineView()
self.browser.settings().setAttribute(QWebEngineSettings.WebGLEnabled, True)
print(self.browser.settings().testAttribute(QWebEngineSettings.WebGLEnabled))
self.browser.setUrl(QUrl("https://webglreport.com/?v=1"))

Although True is displayed, the flag that WebGl is Enabled, but when entering the site https://webglreport.com/?v=1 displays a message
× This browser supports WebGL 1, but it is disabled or unavailable.
Sometimes this is the result of older video drivers being rejected by the browser. Try updating your video drivers if possible.
Also check out Get WebGL, or try installing the latest version of Chrome, or Firefox.

And it passes only 2 parameters - the platform and the user agent. And not as normal - all the rest. Tell me what am I doing wrong? And how right? Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question