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. Best way to implement a nested menu?
Forum Updated to NodeBB v4.3 + New Features

Best way to implement a nested menu?

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 1.3k 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
    Hawk30100
    wrote on last edited by
    #1

    Hello!

    I am just developing an Android application which should run a compass and many more.
    Therefore I want to implement a nested menu.

    It should look something like this:

    @MainMenu
    -> Compass
    -> Settings
    (List of settings, i.e. textfield,...)
    ...
    -> Calibration
    -> Navigation
    -> Settings
    @

    The user should be able to touch the "device-back-button" // back-image on the device to get back to the previous menu item.

    I just started to implement the StateMachineFramework in my application to be able to easily turn on and off my sensors and network connections. I also found this page (http://qt-project.org/wiki/QML-Application-Structuring-Approaches) with kind of loader approach.

    With my current knowledge, I would combine this StateMachineFramework (QHistoryState...) with something else ("something else" currently missing in my head :D) to create such a menu.

    I am not sure that this is the best approach to implement such a menu.

    I hope you could give me some tips.

    Thanks in advance.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hawk30100
      wrote on last edited by
      #2

      /push

      ...maybe there is someone who can answer my question now :)

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hawk30100
        wrote on last edited by
        #3

        /update

        I just used ListModels and a ScrollView+ListView to implement my menu.
        Currently I am using a delegate "menuItemDelegate" and a "editItemDelegate".
        If I use the first one, everytime I click on a ListElement of a ListModel, I read a property "menuModelId" & "menuDelegateId" and then I set the current ListView-model to that new model and delegate. So I am switching trough the menu.
        Second delegate displays the ListElement-properties and give the possibility to open a text editor and change the property values. (After changing, I use the QStorage Class to save the value on harddisk)

        I'm sure that is NOT the best approach, but it works fine for the moment.

        (My menu only needs to be replaced at the same position. If you need a menu like in iOS with the "swipe animation to the left", my approch will not meet your requirements)

        I would be very thankful if someone could post a better approach for this.

        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