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

Loading local HTML to QML WebView in Android - font size issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.7
    • WebView
    • None
    • Android, qt.5.7
    • Android

    Description

      Two QQuickWidgets are placed in ui. Basic QML with a WebView is loaded in both. Webview on first widget loads a plain HTML page from internet. Second widget loads SAME html content from a local file.

      Content in first widget is as expected; matches with same page loaded in a browser. BUT contents in second widget looks zoomed. All font, form elements etc. are much bigger than expected.

      Applying CSS, font-size parameter etc, are not solving the issue.

      EDIT:
      After several experiments, I could observe it as a loading issue: irrespective of content from web or local. To see the behaviour, place 3 QQuickWidgets in the UI.. Now load all of them one after the other.. last one will be properly size adjusted. Give qApp.processEvents((QEventLoop::AllEvents) before each of the setSource statements: now, some will be size adjusted;some may not. sometimes all will be size adjusted.
      Now, place two pushButtons and call loading of qwidget 1 & 2 from first button, and 1 & 3 from second button. 2 & 3 will be loaded properly most of the times.

      Attachments

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

        Activity

          People

            stromme Christian
            abygm Aby Mathews
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes