Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt WebView with unexpected dimensions
Forum Updated to NodeBB v4.3 + New Features

Qt WebView with unexpected dimensions

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 295 Views 1 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.
  • NaLogoN Offline
    NaLogoN Offline
    NaLogo
    wrote on last edited by
    #1

    Hello,

    I'm using a WebView in QML within a container Rectangle.
    The dimensions of the Rectangle are set to the available width and height of the screen.

    Those dimensions look correct on all elements, except the WebView on iOS specifically.

    I'd have to set the width of the WebView to pretty much exactly 75% of the screen width to get a good fit. I'm currently dividing the width value by 1.33 to get a value that looks good on my test device.

    What is the reason for this? And does this ratio apply to all iOS devices?

    NaLogoN 1 Reply Last reply
    0
    • NaLogoN NaLogo

      Hello,

      I'm using a WebView in QML within a container Rectangle.
      The dimensions of the Rectangle are set to the available width and height of the screen.

      Those dimensions look correct on all elements, except the WebView on iOS specifically.

      I'd have to set the width of the WebView to pretty much exactly 75% of the screen width to get a good fit. I'm currently dividing the width value by 1.33 to get a value that looks good on my test device.

      What is the reason for this? And does this ratio apply to all iOS devices?

      NaLogoN Offline
      NaLogoN Offline
      NaLogo
      wrote on last edited by
      #2

      It was an oversight on my part. I did not consider that my high DPI scaling settings might have this effect.
      Enabling high DPI scaling and letting the OS scale factor pass through can have this effect when not considering this when setting positions and sizes.

      Leaving the high DPI scale factor rounding policy on its default value resolves this issue.

      1 Reply Last reply
      0
      • NaLogoN NaLogo has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved