0

Forgive me if this question is silly but I want to know

if there is a way to change the content of a menu bar in different page on a stacked widget directly in qt designer.

For example I want the menu of the menu bar for page 1 of the stacked widget to be menu, inbox, multimedia, exit. For the second page I want the menu bar to contain the following menu; Text, outbox, contact, back. The reason is because

I want different menu controls for different pages of the QstackeWidget. Is this possible from the qt designer ui or I'll have to ultimately do it programatically?

Fortune
  • 1,243
  • 2
  • 19
  • 22

1 Answers1

0

As far as I know (which is QtCreator 3.3.0) the Creator only supports graphically inserting and editing a menu bar in QMainWindow. So for the first part of your question: Yes, you probably have to create the menus programmatically.

For the second part, it is possible to insert a menu bar in any given layout using QLayout::setMenuBar. This also includes the layout inside your stacked widget.

See also: Can you add a toolbar to QDialog?

Community
  • 1
  • 1
Kamajii
  • 1,826
  • 9
  • 21