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. Double menu bar on android device
Qt 6.11 is out! See what's new in the release blog

Double menu bar on android device

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

    Hi there,

    does anyone had the same issue with the menu bar?

    !http://www11.pic-upload.de/26.02.15/dtoc6n6bi51e.png(double menu bar)!

    I'm using a ApplicationWindow with a MenuBar:

    @
    mport QtQuick 2.3
    import QtQuick.Controls 1.2

    ApplicationWindow {
    id: applicationWindow
    visible: true
    width: 1200
    height: 1920!()!
    title: qsTr("whatsOn")

    Loader {
        id: pageLoader
        anchors.fill: parent
        z: 1
    }
    
    menuBar: MenuBar {
        style: MainMenuBarStyle {}
        Menu {
            title: qsTr("Einstellungen")
            MenuItem {
                text: qsTr("Verbindung");
                onTriggered: pageLoader.source = "Client.qml";
            }
            MenuItem {
                text: qsTr("Home");
                onTriggered: pageLoader.source = "Home.qml";
            }
            MenuItem {
                text: qsTr("Timeline");
                onTriggered: pageLoader.source = "TimelineVertical.qml";
            }
    
            MenuSeparator {}
    
            MenuItem {
                text: qsTr("Test");
                onTriggered: pageLoader.source = "Test.qml";
            }
            MenuItem {
                text: qsTr("Test Timeline");
                onTriggered: pageLoader.source = "TestTimeline.qml";
            }
            MenuItem {
                text: qsTr("Timeline Horizontal");
                onTriggered: pageLoader.source = "Timeline.qml";
            }
            MenuItem {
                text: qsTr("Test Detail");
                onTriggered: pageLoader.source = "TestDetail.qml";
            }
            MenuItem {
                text: qsTr("TimelineDetailMonthChart");
                onTriggered: pageLoader.source = "TimelineDetailMonthChart.qml";
            }
            MenuSeparator {}
            MenuItem {
                text: qsTr("Exit")
                onTriggered: Qt.quit();
            }
        }
    }
    
    Home {}
    

    }
    @

    If I uncomment the the following line:

    @
    style: MainMenuBarStyle {}
    @

    the first menu bar with the application icon disappears. Actually I just want to display the first menu bar with out the gray one.

    Furthermore the MenuBarStyle has no effect:

    @
    import QtQuick 2.0
    import QtQuick.Controls 1.2
    import QtQuick.Controls.Styles 1.2

    MenuBarStyle {

    background: Rectangle {
        color: "#27AE60"
    
    }
    

    }
    @

    Thanks

    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