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. App's menubar overlaps with Android status bar

App's menubar overlaps with Android status bar

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qt quickandroid
2 Posts 2 Posters 1.9k 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.
  • A Offline
    A Offline
    aludin
    wrote on last edited by
    #1

    I have generated a very simple app with qt creator and deployed it on an android tablet. The app runs fine, however its menubar overlaps the device's status bar. How can I position correctly the menubar below the status bar? Also is there a way to hide the device's status bar completely? The QML code is given below. Thanks for your help! Note: I have also asked this question on stackoverflow

    import QtQuick 2.5
    import QtQuick.Controls 1.4
    import QtQuick.Dialogs 1.2
    import QtQuick.Layouts 1.0
    
    ApplicationWindow {
        visible: true
        title: qsTr("Hello World")
        width: 640
        height: 480
    
        menuBar: MenuBar {
            Menu {
                title: qsTr("File")
                MenuItem {
                    text: qsTr("&Open")
                    onTriggered: console.log("Open action triggered");
                }
                MenuItem {
                    text: qsTr("Exit")
                    onTriggered: Qt.quit();
                }
            }
        }
    
        MainForm {
            anchors.fill: parent
            button1.onClicked: messageDialog.show(qsTr("Button 1 pressed"))
            button2.onClicked: messageDialog.show(qsTr("Button 2 pressed"))
        }
    
        MessageDialog {
            id: messageDialog
            title: qsTr("May I have your attention, please?")
    
            function show(caption) {
                messageDialog.text = caption;
                messageDialog.open();
            }
        }
    }
    
    1 Reply Last reply
    0
    • K Offline
      K Offline
      kornava
      wrote on last edited by
      #2

      <application
      ...
      android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
      ...
      </application>

      this will make your app launch in full screen mode, you have to add it in your manifest file.
      it works with android 4.0 and lower.
      Check this link for further information..
      http://developer.android.com/intl/pt-br/training/system-ui/status.html

      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