Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70945

QtWebView loadHtml will show html source (not rendered page) on Android 4.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.6, 5.11.2
    • Fix Version/s: None
    • Component/s: WebView
    • Labels:
      None
    • Environment:
      Android 4.3
      Qt 5.9.x
    • Platform/s:
      Android

      Description

      When running QtWebView on android 4.3 (api level < 19, not chromium based), loadHtml call will show the html source, not the rendered page.

      It is the same issue as:

      https://stackoverflow.com/questions/30420949/webview-shows-source-html-with-loaddatawithbaseurl-not-rendered-view

      Change the mime type from "text/html;charset=UTF-8" to simple "text/html" fix the issue.

      It only happens to Android 4.3 (maybe also earlier versions too), more recent version of Android does not have this issue. (tested on 5.x and 6.x)

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            stromme Christian
            Reporter:
            steve.k.chiu Steve K. Chiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes