QWebEngineView and custom OpenGL content rendering issues

  • Hi,

    I am developing an app where I use QWebEngineView to show some 3d Web content and I render some custom data (images) in OpenGL at the same time. The app is developed based on this official Qt example: http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html

    As I cannot share the source code of my app (due to confidentiality issues), i reproduced the problem with the given Qt official example. The example itself renders the animation fine; however, the problem starts when I add a QWebEngineView as follows to the qml file:

    // add it to the top of the qml file
    import QtWebEngine 1.6
    // add QWebEngineView after Rectangle
        WebEngineView {
            id: myWebEngineView
            objectName: "WebEngineView"
            url: "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select"
            anchors.right: parent.right
            width: 300
            height: 300
    // include in main.cpp file
    #include <QtWebEngine>
    // Add this after QGuiApplication

    This will show the webpage content in a small area (when making the window full screen). The webpage contains a drop down list, when I click this drop down list sequentially, it will block the rendering (you can see that the animation is not smooth). The same problem happens in our application as well. When clicking on some webcontent elements, the images are not rendered and that causes some glitches.

    I have seen a warning at http://doc.qt.io/qt-5/qml-qtwebengine-webengineview.html#rendering-to-opengl-surface for using QtWebEngine::initialize in "Rendering to OpenGL Surface" section, but I am not sure how to handle this problem.

    Thank you

    Thanks a lot

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.