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. Menu bar and sub menu issue
Qt 6.11 is out! See what's new in the release blog

Menu bar and sub menu issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 428 Views
  • 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.
  • G Offline
    G Offline
    Gokulnath
    wrote on last edited by
    #1

    We have an issue with Menu Bar and Sub Menu Bar in bringing Active Focus using keyboard short cuts like "Alt + F" and "Alt + E"
    Problem Scenario: I have 3 menus like 1. &File 2. &Edit 3. &Recent
    Each menu has one Sub Menu like File menu has 1. &OpenFile
    2. &EditFile
    Our requirement is If we use keyboard shortcut "Alt + F" and "Alt + E" should bring or shift activefocus to sub-menu "EditFile" under main menu "File".

    In our case "Alt+F' and "Alt+E" is only bringing activefocus to main menu "Edit".
    Please suggest us solution for our problem

    R 1 Reply Last reply
    0
    • G Gokulnath

      We have an issue with Menu Bar and Sub Menu Bar in bringing Active Focus using keyboard short cuts like "Alt + F" and "Alt + E"
      Problem Scenario: I have 3 menus like 1. &File 2. &Edit 3. &Recent
      Each menu has one Sub Menu like File menu has 1. &OpenFile
      2. &EditFile
      Our requirement is If we use keyboard shortcut "Alt + F" and "Alt + E" should bring or shift activefocus to sub-menu "EditFile" under main menu "File".

      In our case "Alt+F' and "Alt+E" is only bringing activefocus to main menu "Edit".
      Please suggest us solution for our problem

      R Offline
      R Offline
      Redman
      wrote on last edited by
      #2

      @Gokulnath You can use the KeyEvent (https://doc.qt.io/qt-6/qml-qtquick-keyevent.html#count-prop) to hook into pressed keys. It's possible
      to check for key combinations.

      After the event is triggered programm out your needed logic with focus

      G 1 Reply Last reply
      0
      • R Redman

        @Gokulnath You can use the KeyEvent (https://doc.qt.io/qt-6/qml-qtquick-keyevent.html#count-prop) to hook into pressed keys. It's possible
        to check for key combinations.

        After the event is triggered programm out your needed logic with focus

        G Offline
        G Offline
        Gokulnath
        wrote on last edited by
        #3

        @Redman only the alt key press is being detected not both alt+any key(ex:F) is being detected. I have tried using sequence, key event but couldn't able to detect. If we detect the press event then we give a focus to menu so that the next key press event can open the submenu in this shown menu.

        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