Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

Issues with WebView



  • Hello,
    I was trying to make a really simple web browser with QML, I made the following code:

    import QtQuick 2.12
    import QtQuick.Controls 2.5
    import QtWebView 1.1
    
    ApplicationWindow {
        visible: true
        width: 640
        height: 480
     
    
        header: ToolBar{
            Row{
                spacing: 6
                ToolButton{
                    text: "<-"
                    onClicked: {visorWeb.goBack()}
    
                }
                ToolButton{
                    text: "->"
                    onClicked: {visorWeb.goForward()}
                    }
                ToolButton{
                text: "Reload"
                onClicked: {visorWeb.reload()}
                }
                Label{
                text: visorWeb.loadProgress
                }
                }
            }
    
            WebView{
                id: visorWeb
                anchors.fill: parent
                url: "https://www.google.es"
    
    
            }
        }
    

    With this code I can use the browser, but when I try to load a complex web page (for example "https://www.qt.io") I can see it but I get the following type of errors:
    [6932:9236:0607/103211.856:INFO:CONSOLE(84)] "Uncaught TypeError: $(...).carousel is not a function", source: https://www.etsiae.upm.es/fileadmin/html/scripts/upm.js (84)
    [6932:8684:0607/103712.244:ERROR:sync_point_manager.cc(248)] Client waiting on non-existent sync token
    [6932:8684:0607/103712.244:ERROR:sync_point_manager.cc(248)] Client waiting on non-existent sync token
    [6932:8684:0607/103712.410:ERROR:sync_point_manager.cc(318)] Client did not release sync token as expected
    [6932:8684:0607/103712.410:ERROR:sync_point_manager.cc(318)] Client did not release sync token as expected
    [6932:8684:0607/103712.439:ERROR:sync_point_manager.cc(318)] Client did not release sync token as expected
    [6932:8684:0607/103712.439:ERROR:sync_point_manager.cc(318)] Client did not release sync token as expected
    [6932:8684:0607/103712.947:ERROR:sync_point_manager.cc(248)] Client waiting on non-existent sync token
    [6932:8684:0607/103712.947:ERROR:sync_point_manager.cc(248)] Client waiting on non-existent sync token

    Does anyone know what I can do to solve this trouble? Thanks



  • Hi @Dooham

    Just tried your code on Ubuntu 16.04 & Qt 5.12.2
    url: "https://www.qt.io" works fine.

    Which Qt Version & Platform you are using ?

    Below links may help you,

    QWebEngine asserts with proxy.
    Qt: Unknown module(s) in QT: webview.

    0_1559899022150_6.png



  • @Pradeep-P-N Thanks for your response. I am using Qt Creator 4.9.1 in Windows 10. The kit that I used is MSVC2017-64bit.
    When you run the code, haven`t you any notice in the application output window?



  • Hi @Dooham

    Below is the Application Output

    QML debugging is enabled. Only use this in a safe environment.
    WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
    


  • @Pradeep-P-N First of all sorry for my delay. I think the trouble could be with Windows and not with the code. I one of the link that you send me they have a similar trouble and it's just in Windows not in Linux. Maybe it is a problem with the kit that I am using.