Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMenus cannot be directly clicked.

QMenus cannot be directly clicked.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 206 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.
  • E Offline
    E Offline
    Eric_Lund
    wrote on last edited by
    #1

    I'm writing a desktop app on Linux. The app has to have similar look and feel to an old BX Pro app written for IBM AIX. There is a menu at the top, with several menus at the top left, and the help menu is at the top right. I'm using menuBar()->addMenu(<File, Tools, View>); for each of the three left menus. I create a separate menuBar, set it as the corner widget (top right) and add the help menu to that bar. My problem is a sequence issue. I cannot click on the File menu directly. I have to click on the View menu, then slide across to the File menu. From there, I can select the item I want.

    I have methods for the creation of each QMenu and it's contents/submenus. Then I have a method to put each of the QMenus in the menubar. I cannot copy the code here, as it's on a classified system (DOD work). However, the text below should give you the idea (nothing classified):

    void <class>::createFileMenu() // others similar
    {
    fileMenu = new QMenu("&File");
    newCommMenu = fileMenu->addMenu("&New Comm");
    createNewCommMenu();
    loadAction = fileMenu->addAction("&Load");
    saveAction = fileMenu->addAction("&Save");
    exitAction = fileMenu->addAction("E&xit");
    }

    // Other menus created similarly

    void <class>::createMenuBars()
    {
    menuBar()->addMenu(fileMenu);
    menuBar()->addMenu(toolsMenu);
    menuBar()->addMenu(viewMenu);

     helpMenuBar = new QMenuBar(menuBar());
     helpMenuBar->addMenu(helpMenu);
     menuBar()->setCornerWidget(helpMenuBar);
    

    }

    The menu bar looks sort of like this, with F, T, V, and H being underscored:


    File Tools View Help


    I can successfully click on View or Help, but to get to Tool or File, I have to click on View and slide across to
    the menu I want. I can directly access File or Tools with <alt>F or <alt>T.

    I'm fairly new to QT, so any help appreciated. Thanks in advance.
    Eric

    E 1 Reply Last reply
    0
    • E Eric_Lund

      I'm writing a desktop app on Linux. The app has to have similar look and feel to an old BX Pro app written for IBM AIX. There is a menu at the top, with several menus at the top left, and the help menu is at the top right. I'm using menuBar()->addMenu(<File, Tools, View>); for each of the three left menus. I create a separate menuBar, set it as the corner widget (top right) and add the help menu to that bar. My problem is a sequence issue. I cannot click on the File menu directly. I have to click on the View menu, then slide across to the File menu. From there, I can select the item I want.

      I have methods for the creation of each QMenu and it's contents/submenus. Then I have a method to put each of the QMenus in the menubar. I cannot copy the code here, as it's on a classified system (DOD work). However, the text below should give you the idea (nothing classified):

      void <class>::createFileMenu() // others similar
      {
      fileMenu = new QMenu("&File");
      newCommMenu = fileMenu->addMenu("&New Comm");
      createNewCommMenu();
      loadAction = fileMenu->addAction("&Load");
      saveAction = fileMenu->addAction("&Save");
      exitAction = fileMenu->addAction("E&xit");
      }

      // Other menus created similarly

      void <class>::createMenuBars()
      {
      menuBar()->addMenu(fileMenu);
      menuBar()->addMenu(toolsMenu);
      menuBar()->addMenu(viewMenu);

       helpMenuBar = new QMenuBar(menuBar());
       helpMenuBar->addMenu(helpMenu);
       menuBar()->setCornerWidget(helpMenuBar);
      

      }

      The menu bar looks sort of like this, with F, T, V, and H being underscored:


      File Tools View Help


      I can successfully click on View or Help, but to get to Tool or File, I have to click on View and slide across to
      the menu I want. I can directly access File or Tools with <alt>F or <alt>T.

      I'm fairly new to QT, so any help appreciated. Thanks in advance.
      Eric

      E Offline
      E Offline
      Eric_Lund
      wrote on last edited by
      #2

      @Eric_Lund

      OK, the help menu should have been out to the far right. It was when I typed it. :-)

      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