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 "menu bar " to QMdiArea ??
Forum Updated to NodeBB v4.3 + New Features

how to add "menu bar " to QMdiArea ??

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 220 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 Anonymous_Banned275
    #1

    Update
    Looks as there is no (easy) way to add menu/ staus bar to QMDiArea . So be it.
    I have replaced
    setCentralWidget(console )

    with
    setCentralWidget(MainWindow_MDI_Area_MainWindow);
    , new class derived from QMainWindiow...

    It does the job I need.

    I have few questions

    1. Why I can use
      ui->menubar...

    and have to use

    statusBar()->showMessage

    there is no visible way to do the same , post status , using

    ui->statusBar

    1. I cannot find how to add / show the added MainWindow title etc. - I have "mdi area" in plain window , but cannot see the window frame , title , etc, itself...
    MainWindow_MDI_Area_MainWindoiw::MainWindow_MDI_Area_MainWindoiw(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow_MDI_Area_MainWindoiw)
    {
        ui->setupUi(this);
        ui->menubar->addMenu("Test first menu ");
    
        // test status bar
        //ui->statusbar->
        //setStatusBar("TEST Status bar ");
        statusBar()->showMessage("TEST Status bar ");
        ui->statusbar->>showM
    
        //ui->statusbar->setWindowTitle("Test window title"); //??
    
    }
    
    

    Re: qmdiarea menubar

    addendum
    I have tried this in past and it looks as a wrong concept to add mdi area and expect to add ANY bars to it

    ...
    I have managed to create / build QMdiArea....
    I can add sub windows etc....
    I Like to have QMdiArea visible as windows and to have a title.
    I can add code to add window title but I cannot see it...

    I would like to add "standard " window menu bar and cannot seem to find how .

    The attached screen shot is "missing" the QMdiArea window and its menu bar to link to subwindows.

    bae9cc03-7664-4f1a-917c-0e85585846ce-image.png

    PS I am posting this because to original was dated...
    PPS I would like to make sure readers understand that I am NOT USING plain MainWindow - my QMdiArea is an add / option "attached" to Main WIndow WHICH has it own menu bar already.
    )

    1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher referenced this topic on

    • Login

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