How Can is add a QMenuBar Object to a QDialog Object? I know QMainWindow have a method "void setMenuBar ( QMenuBar * menuBar ) " But QDialog Havn't. thx
How Can is add a QMenuBar Object to a QDialog Object? I know QMainWindow have a method "void setMenuBar ( QMenuBar * menuBar ) " But QDialog Havn't. thx
You could embed a QMainWindow in the dialog and add the QMenuBar there.
There are probably other solutions, too.
Well... Basically it's against the rules of good GUI design to have a menu bar in a dialog, so I suggest you reconsider your decision. But if you insist on having it, you have to add it manually to your dialog and place it in the layout like any other widget.
well thank every one...i got this problem by manual add in my inherit class.
Sorry for late response, but QLayout::setMenuBar() might be useful for this...
J-P Nurmi
Bookmarks