Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Issues with WebView

    QML and Qt Quick
    webview qml browser
    2
    5
    893
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dooham
      Dooham last edited by

      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

      1 Reply Last reply Reply Quote 0
      • Pradeep P N
        Pradeep P N last edited by

        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 Nimbalkar.
        Upvote the answer(s) that helped you to solve the issue...
        Keep code clean.

        Dooham 1 Reply Last reply Reply Quote 3
        • Dooham
          Dooham @Pradeep P N last edited by

          @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?

          Pradeep P N 1 Reply Last reply Reply Quote 1
          • Pradeep P N
            Pradeep P N @Dooham last edited by

            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 Nimbalkar.
            Upvote the answer(s) that helped you to solve the issue...
            Keep code clean.

            Dooham 1 Reply Last reply Reply Quote 2
            • Dooham
              Dooham @Pradeep P N last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post