Reputation: 6203
I'm using QWebEngine to display some webpages. Unfortunately it uses OpenGL internally - which leads to a crash on some graphics adapters (one can see the driver-DLL as the reason for the crash easily). As a second caveat it is not possible to catch this crash by a try-catch-block.
So my question: how can one force QWebEngine to use software rendering only and to not to use OpenGL?
Thanks!
Upvotes: 4
Views: 6524
Reputation: 1186
I assume you're on Windows, and are using the official Qt binaries, and are using Qt 5.5 or newer. These allow to switch between Desktop OpenGL, ANGLE (Direct X) and software rasterization at runime.
It should be therefore enough to set the QT_OPENGL environment variable to either "angle" (to use the DirectX backend) or "desktop". To hardcode this you can set the Qt::AA_UseOpenGLES or Qt::AA_UseSoftwareOpenGL application attributes.
If you use WebEngine through Qt Quick, you can also use the Qt Quick 2D renderer.
Upvotes: 4