Hello, I’m new here and I’m currently creating my own little GUI and will likely have a variety of questions that I’ll be asking, but one that sticks out that I haven’t found after searching for a bit is this. I have a MainWindow and a separate Widget using the setCentralWidget function within the MainWindow. I’ve got them both working well, but how do I have the Widget see/use any of the MainWindow’s MenuBar functions? I have a simple Open File/Save File using a QFileDialog, but what is the best method for the Widget to be able to use the menubar? Thank you.
Hello
The best thing is to use QAction. With them, you can write menu entries and use them in Menus. You can even add an icon, a shortcut and use them in a toolbar.
(QMenu, QAction, QToolBar…)
Read and learn in a tutorial found on the internet. There are many, like this one
Have a lot of fun!