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. qml android full screen problem

qml android full screen problem

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 232 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.
  • Q Offline
    Q Offline
    qwqwqw2
    wrote on last edited by qwqwqw2
    #1

    phone: redmi
    android version: android 10
    qt version: qt 6.7

    my app screen orientation is landscape
    the phone screen has safe area

    top     : 0
    left    : 28
    bottom  : 0
    right   : 0
    

    c++ code:

    QObject::connect(p->screen, &QScreen::availableGeometryChanged,
                         [&](const QRect &){
                             TIP_COUT << "availableGeometryChanged:" << p->screen->availableGeometry();
                         });
    

    qml code:

    ApplicationWindow {
        minimumWidth: 1560
        minimumHeight: 720
        visibility: Qt.platform.os === "windows" ? Window.Minimized
                                                 : Window.FullScreen
      ........
    }
    

    app first start, output:

    availableGeometryChanged: QRect(0,0 851x393)
    

    when i turn to main screen or drag down the notification drawer
    screen size will changed, output:

    availableGeometryChanged: QRect(0,0 822x393)
    

    the witdh parameter minus left safe area value

    how fix?

    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