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. Android menu without qml etc.
Forum Updated to NodeBB v4.3 + New Features

Android menu without qml etc.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidqmenuoptions menu
5 Posts 2 Posters 2.5k 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.
  • H Offline
    H Offline
    huw_
    wrote on 16 Jan 2018, 14:03 last edited by
    #1

    I have a presentation problem with using qmenubar, qmenu & qaction for an android tablet. Presently the menu "headers" appear within an options menu (the three box/bar icon located at the top right). However, once a particular menu "heading" has been selected the drop down menu appears in the top left of the screen.

    I wish to keep things simple and do not want to get involved in adding further dependencies to things like qml. So, I am looking for a solution that uses standard C++ calls or passing details to setstylesheet.

    Presently, I would be happy with solutions that relocates the dropdown menu adjacent to the "header" menu selected. I would be also interested to learn how to move the options icon (to the top left). I'm using qt creator 4.5/qt 5.10.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      huw_
      wrote on 16 Jan 2018, 14:50 last edited by
      #2

      I see the same behaviour running this example: http://doc.qt.io/qt-5/qtquickcontrols-gallery-example.html

      Is this deemed to be a standard style? Seems awkward to have menus jumping around. Perhaps this is a bug? I have the Android 27 sdk.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        huw_
        wrote on 16 Jan 2018, 14:58 last edited by
        #3

        Using NDK Revision 16.1.4479499

        1 Reply Last reply
        0
        • H Offline
          H Offline
          huw_
          wrote on 16 Jan 2018, 15:37 last edited by
          #4

          setNativeMenuBar(false) and using setStyleSheet() to modify menu font size enables a classic desktop presentation. Old, perhaps, but at least the menus appear where you expect them.

          Still interested in the native remedy.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GTDev
            wrote on 17 Jan 2018, 11:12 last edited by
            #5

            Hi,
            for an easy native-styled Android menu (QML-based though), you can also have a look at V-Play Engine, which extends Qt and handles native features and styling for Android and iOS.

            E.g. for a native styled Navigation, with the V-Play Navigation Components:

            import VPlayApps 1.0
            
            App {
              Navigation {
                NavigationItem {
                  title: "Home"
                  icon: IconType.home
            
                  NavigationStack {
                    Page { title: "Home" }
                  }
                }
            
                NavigationItem {
                  title: "Favorites"
                  icon: IconType.star
            
                  NavigationStack {
                    Page { title: "Favorites" }
                  }
                }
              }
            }
            

            Best,
            GTDev

            Senior Developer at Felgo - https://felgo.com/qt

            Develop mobile Apps for iOS & Android with Qt
            Felgo is an official Qt Technology Partner

            1 Reply Last reply
            0

            3/5

            16 Jan 2018, 14:58

            • Login

            • Login or register to search.
            3 out of 5
            • First post
              3/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved