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. Wrong fullscreen size in Android

Wrong fullscreen size in Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 366 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.
  • G Offline
    G Offline
    Gustavo Serra
    wrote on last edited by
    #1

    Hi!

    I am having an issue when trying to set immersive mode for my Android app. The screen content is shifted due to the notch area in my cellphone. I am not interested in using the cutout edges in this particular app. The code works fine on devices with no notch.
    Here is the sample code to reproduce the problem:

    import QtQuick
    
    Window {
        visibility: Window.FullScreen
        // If I use the lines below, the code works, but why?
        // y: Screen.desktopAvailableHeight - height
        // x: Screen.desktopAvailableWidth - width
    
        Rectangle {
            width: 30
            height: parent.height
            color: "red"
            anchors.right: parent.right
        }
        Rectangle {
            width: parent.width
            height: 30
            color: "blue"
            anchors.bottom: parent.bottom
        }
    }
    

    Here are the results:

    b6f961d5-200b-494d-a7d2-e3d75981999c.jpeg

    0d877851-85eb-4775-a26c-234a53eb2a38.jpeg

    The rectangles don't appear. Is this a bug with Qt or is something wrong with the code? I tested using Qt 6.6.3 and 6.8.1.

    If I use the commented lines, the area is set properly, but this seems like a workaround. Honestly, I don't understand why it should work as I am not changing the size, only the coordinates.

    I appreciate any help you can provide.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Michel de Boer
      wrote on last edited by
      #2

      I use ApplcationWindow instead of Window in my Android app. That one is automatically full screen on Android.

      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