how to add "menu bar " to QMdiArea ??
-
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
- 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
- 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.
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.
) - Why I can use
-
C Christian Ehrlicher referenced this topic on