Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Incorrect site view in QML WebView

Incorrect site view in QML WebView

Scheduled Pinned Locked Moved Solved Qt WebKit
2 Posts 1 Posters 516 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.
  • B Offline
    B Offline
    Bleach
    wrote on last edited by
    #1

    Some sites not fully loaded in QML WebView on Android. As example banggood.com. As far as I understand this related to this bug https://bugreports.qt.io/browse/QTBUG-76436. It marked fixed, but look like is it not.

    I try to fix this by

    webView.runJavaScript("import WebSettings ;\nWebSettings settings;\nsettings.setDomStorageEnabled(true);");
    

    but receive error:

    Uncaught SyntaxError: Cannot use import statement outside a module 
    

    I tried several Qt version and devices.
    Please help me to resolve this.
    Also please confirm what sites like banggood.com dont work in Qt Example minibrowser on Android. And produce errors:

    I chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read properties of null (reading 'length')", source: https://psr.staticbg.com/rum/monitor.min.js?v=0508 (1)
    I chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read properties of null (reading 'getItem')", source: https://ms.staticbg.com/default/web/dist/js/app.7b8d6ad7.js (1)
    
    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bleach
      wrote on last edited by
      #2

      I fixed this by added

      webSettings.setDatabaseEnabled(true);
      webSettings.setDomStorageEnabled(true);
      

      in constructor of QtAndroidWebViewController.java
      end rebuild WebView.

      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