Important: Please read the Qt Code of Conduct -

QML: Why my buttons at the bottom are under the lower Android button bar, before creen rotation

  • In the code below, the row of buttons shows behing the Android lower bar of button (triangle, circle, square). When I rotate, everything is fine. When I rotate back, everything is fine too.

    So it is only the first time that something goes wrong.

    Any idea ?

    import QtQuick 2.4
    import QtQuick.Controls 2.15
    import QtQuick.Window 2.15
    Item {
        property alias unit_add: unit_add
        width: Screen.desktopAvailableWidth
        height: Screen.desktopAvailableHeight
        ListView {
        Row {
            id: buttons
            width: parent.width
            height: 43
            visible: true
            spacing: 16
            anchors.bottom: parent.bottom
            anchors.topMargin: 10
            anchors.bottomMargin: 10
            anchors.horizontalCenter: parent.horizontalCenter
            Button {
                id: unit_add
                text: qsTr("Add")
            Button {
                id: unit_delete
                text: qsTr("Delete")
            Button {
                id: unit_edit
                text: qsTr("Edit")

  • I remember I had a similar issue on Android a few years ago. I switched to Screen.width and Screen.height.

Log in to reply