MainWindow doesnt show MenuBar
-
@medyakovvit
Won't he needsetMenuBar(sb)
for his main window too? -
@medyakovvit Already tried this, and many of other combination "removing-adding". No one helps
-
Hi,
Aren't you on Ubuntu ? If so, isn't your menu bar shown at the top of the screen macOS like ?
-
@Vadik YEEEEAH, solved, after some investigations and reinstalling of all components it turned out. Need to change in 'System Settings -> Appearance -> Behavior' parameter for 'Show the menus for a window' from the "In the menu bar" to "In the window's title bar". Thanks to everyone who tried to help.
-
@JNBarchan Question is solved, but as you asked.
I don't think it's needed as he gets pointer to menu bar with:QMenuBar *mb = menuBar();
and this function returns the menu bar that already set.
-
@medyakovvit
Yeah, I kinda mis-read (C++ not being my language) it as having been:QMenuBar *mb = new QMenuBar();
thinking he was creating his own new one which would need setting. Using the existing menubar and changing its content is of course preferable.