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

QML WebView width/height property behavior is not the same on Simulator/device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Moved
    • Not Evaluated
    • None
    • 4.7.4
    • None

    Description

      The documentation of QML WebView says the following:

      If the width and height of the item is not set, they will dynamically adjust to a size appropriate for the content.

      This seems to be the case on the Simulator, but not on device (tried with N950 and Symbian Belle). Consider the following application:

      import QtQuick 1.1
      import QtWebKit 1.0
      
      Rectangle {
          width: 360
          height: 360
          WebView {
              anchors.centerIn: parent
              url: "http://www.google.com"
              onLoadFinished: {
                  console.log(width)
                  console.log(preferredWidth)
              }
          }
      }
      

      On the simulator it outputs the following, showing that width property got automatically adjusted:
      960
      0

      But when run on device, the output is
      0
      800

      Attachments

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

        Activity

          People

            dajansen Damian Jansen (closed Nokia identity) (Inactive)
            latej Lauri Jääskelä
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes