Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. qml webview在iOS中无法显示本地html
Forum Updated to NodeBB v4.3 + New Features

qml webview在iOS中无法显示本地html

Scheduled Pinned Locked Moved Unsolved Chinese
3 Posts 3 Posters 749 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.
  • I Offline
    I Offline
    icebing
    wrote on last edited by
    #1
       WebView
        {
            id:web
            anchors.centerIn: parent
            anchors.fill: parent
            url:Qt.platform.os === "android"?"file:///android_asset/data/map.html":"test.html";
            onLoadProgressChanged:
            {
               if(web.loadProgress == 100)
               {
                   var queryFun = "loadMap();"
                   web.runJavaScript(queryFun, function(result) { console.log(result); });
               }
            }
        }
    

    在Xcode本地test.html显示空白
    Xcode提示:
    2021-02-01 08:20:09.445040+0800 GstDebugWizard[367:11897] WF: === Starting WebFilter logging for process GstDebugWizard
    2021-02-01 08:20:09.445097+0800 GstDebugWizard[367:11897] WF: _userSettingsForUser mobile: {
    filterBlacklist = (
    );
    filterWhitelist = (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
    }
    2021-02-01 08:20:09.445137+0800 GstDebugWizard[367:11897] WF: _WebFilterIsActive returning: NO

    Xcode的定位、http请求权限已开。
    test.html代码如下:
    <font color = "red">TTTTTT</font>

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xueyu2021
      wrote on last edited by
      #2

      自己搞定了
      分享一下吧
      https://blog.csdn.net/nikon800/article/details/113564455

      1 Reply Last reply
      0
      • lionelML Offline
        lionelML Offline
        lionelM
        wrote on last edited by
        #3

        可以,学到了👏

        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