Loading local HTML to QML WebView in Android - Size issue



  • 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; resized to the container. 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. How can we 'correct' this behaviour ?

    EDIT: After repeated experiments I have observed that: the behaviour is not consistent. If there are more than one QQWidgets, the LAST LOADED widget displaying fully resized content... IRRESPECTIVE of local file or Web.

    Issuing qApp->processEvents(QEventLoop::AllEvents) before and after qQwidget.setSource improves the situation; still erratic.

    Request to throw some light into this issue..

    Aby.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.