Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. WebView small html page turns blank
Forum Updated to NodeBB v4.3 + New Features

WebView small html page turns blank

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.2k Views 2 Watching
  • 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.
  • F Offline
    F Offline
    Fab01
    wrote on last edited by A Former User
    #1

    Hi all,

    I've a Qt 4.8.5 application running on ubuntu with a WebView in a QML Qt Quick 1.1 file loading a local html file.

    If there is not enough caracters in the html file the WebView shows a blank page !?

    This is the code of the html page i try to load :

    <body>

    <h1>Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

    Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello

    Hello Hello Hello Hello Hello Hel

    </h1>

    </body></html>

    If I delete one caracter or more the WebView shows a blank page.

    If I add a single caracter to the last word "Hel" the WebView render the page nicely.

    But if I add a single caracter in the middle of the 3rd line, for example, the WebView shows a blank page too ?

    What the hell is going on with this ??

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fab01
      wrote on last edited by Fab01
      #2

      Eventually I found a solution.

      When the webview load an html page with not much code inside the width and height are set to 0 I don't know why.

      So in the onLoadFinished event if I have the 0 value I set this properties to some right values.

      P.S : sorry I don't know how to put the "Solved" tag

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Glad you found out and thanks for sharing !

        You can mark your thread as solved using the "Topic Tools" button

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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