Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Issues with WebView
QtWS25 Last Chance

Issues with WebView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
webviewqmlbrowser
5 Posts 2 Posters 1.5k Views
  • 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.
  • DoohamD Offline
    DoohamD Offline
    Dooham
    wrote on last edited by
    #1

    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
    0
    • Pradeep P NP Offline
      Pradeep P NP Offline
      Pradeep P N
      wrote on last edited by
      #2

      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.

      DoohamD 1 Reply Last reply
      3
      • Pradeep P NP Pradeep P N

        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

        DoohamD Offline
        DoohamD Offline
        Dooham
        wrote on last edited by
        #3

        @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 NP 1 Reply Last reply
        1
        • DoohamD Dooham

          @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 NP Offline
          Pradeep P NP Offline
          Pradeep P N
          wrote on last edited by
          #4

          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.

          DoohamD 1 Reply Last reply
          2
          • Pradeep P NP Pradeep P N

            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.
            
            DoohamD Offline
            DoohamD Offline
            Dooham
            wrote on last edited by
            #5

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

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved