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. how to add anther primary sub-menu - in C++ code ?
Forum Updated to NodeBB v4.3 + New Features

how to add anther primary sub-menu - in C++ code ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
aniother
1 Posts 1 Posters 160 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    OK, this is so simple , but confusing...
    I can add another menu to main mdiArea menu bar...
    I can add executable "actions" to it...

    I can add " primary sub-menu" and their executable...

    HOW do I add another "primary sub-menu" ?

    All in code -
    I have given up on adding menus in QTDesigner GUI - too inconsistent...

    This is what I am after

    mdiArea "bar ' main menu
    primary submenu secodary executable
    secodary executable
    secodary executable

    another primary submenu secodary executable
    secodary executable
    secodary executable

    QMenu *BT_Menu_SubMenu = menuBar()->addMenu(tr("&Bluetooth bluetoothctl (command)... "))
    ->addMenu("&bluetoothctl submenu ... ");

    this adds to main menu bar - not what is needed

    QMenu *BT_Menu_SubMenu_1 = menuBar()->addMenu(tr("&Bluetooth bluetoothctl (command)... "))
    ->addMenu("&bluetoothctl submenu ... ");

    int sub_Index = 10;
    QAction *aboutAct_submenu_index_0 =
        BT_Menu_SubMenu->addAction(tr("& bluetoothctl  help "),
                                 this, [this, sub_Index ]()->void{menu_slot_indexed(sub_Index);});
    sub_Index = 11;
    QAction *aboutAct_submenu_index_1 =
        BT_Menu_SubMenu->addAction(tr("&bluetoothctl  list adapters..."),
                                   this, [this, sub_Index ]()->void{menu_slot_indexed(sub_Index);});
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from C++ Gurus on

    • Login

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