Important: Please read the Qt Code of Conduct -

QT5.9 Windows7 64bit QWebEngine WebGL --Could not share GL contexts.

  • Hi.
    I would like to ask a question.
    When I used QT5.7 or QT5.8 QWebEngine, I think there is no problem. in watching webGL Page.
    But When I use QT5.9 QWebEngine,Most of All Page is not working..I got a Error Message

    [7816:2000:0602/] Could not share GL contexts.
    js: Error creating WebGL context.

    I checked it on QWebEngine sample project WebEngine Demo Browser and WebEngine simple browser and so on.

    for example,
    [page viewing successed]
    [page viewing failed]

    I think Error Page might be using three.js?

    when I access their failed Web page from Chrome Web Browser,there is no problem.but when I access their pages on from QT5.9 using webEngine application ,it is not.

    my environment is Windows7 or 10 ,64bit intel HD Graphics
    I try other PC,
    Windows10[64bit),GTX980Ti(newdriver applied)

    If there is any reason , Could you tell me solution?

  • Did you manage to solve this? I'm using a WebView from QML, but get the same error when trying to render WebGL on Windows.

  • Hi,

    Got the same issue on all our workstations here (win7, win10, nvidia or intel gpu, directx 12), even though Google Chrome has no problem render 3D views.
    AFAIU, pre-compiled Qt binaries for windows are shipped by default with ANGLE as a graphic "gateway".
    I'm currently recompiling the lib with -opengl desktop option to use graphic cards OpenGL drivers and check if it solves the issue.
    Will post the answer when I'm done, hoping it could help


  • Well, after multiple recompile of the lib, with or without angle, angle combined, opengl desktop, opengl-es-2 still had context errors.
    Found on another thread of this forum that I should try to call :


    This removed all the warnings and context errors !
    Note that there is several value in the ApplicationAttribute enum that you could be interested in:

    AA_UseDesktopOpenGL = 15,
    AA_UseOpenGLES = 16,
    AA_UseSoftwareOpenGL = 17,
    AA_ShareOpenGLContexts = 18,


  • @jee4404 I solve it follow your way. Thanks.
    At the beginning, I used QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); but it didn't work.

Log in to reply