Is it possible to add a menu bar to a widget

I would like to add a QMenuBar to a window of my program (not the QMainWindow) from QtDesigner but I do not see this widget in there and it seems the only way to do this from designer is to use a mainwindow. Would I absolutely need to create this QMenu by hand coding it. Is it possible/ok to instead add a QMainwindow that is actually declared inside my main QMainwindow?


Why don't you use a second instance of QMainWidow or make the widget which need to receive the menu bar inherit from it.

Right click on widget in Object panel (where you see objects in tree view) and select Create Menu Bar. That's it.

Need Your Help

Re-enable WebGL without restarting Chrome

google-chrome webgl

When Chrome stops WebGL and gives you the following error (in a yellow banner on top of the screen): "Rats! WebGL hit a snag...", and reloading does not work (WebGL is still not re-enabled), is it

decimal vs double! - Which one should I use and when?

c# double decimal precision currency

I keep seeing people using doubles in C#. I know I read somewhere that doubles sometimes lose precision.