Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    How to add buttons to Android action bar or implement navigation bar legacy overflow button

    Mobile and Embedded
    2
    2
    1798
    Loading More Posts
    • 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.
    • T
      TinRaven last edited by

      I have a QWidget application that uses the Android menu button via QMenuBar calls. This works fine on devices with a hardware button but I need a solution for devices such as the Nexus 7 with no button.

      Ideally I would like to do things correctly and make use of the action bar and replace the menu with buttons on the bar but I believe that QT does not support this.

      A quick solution would be to add a legacy overflow button to the navigation bar by setting the sdk versions to 10 but when I do this I still get an action bar and the overflow button appears on both the navigation and action bar. Selecting the button on the navigation bar causes the menu to appear next to the action bar. This behavior doesn't seem right and the action bar wastes space.

      Has anyone found a solution to this please? Either being able to add buttons to the action bar or be able to add the legacy overflow button to the navigation bar without having the action bar on screen?

      I am using QT5.3.0 and am mainly targeting devices with Android 4.0+. The project also supports an iOS build.

      1 Reply Last reply Reply Quote 0
      • S
        s.frings74 last edited by

        I composed my own navigation bar with Widgets instead: http://stefanfrings.de/android_qt/index-en.html

        1 Reply Last reply Reply Quote 0
        • First post
          Last post