Devolus
Devolus

Reputation: 22084

How to add a menubar to a QFrame with QtDesigner?

I have created a QFrame with Qt designer, and now I'm trying to add a menubar. So far I have seen that I maybe should have used QMainWindow but I can't change the type anymore and I don't see any option to attach a menu.

I have tried to create an empty QMainWindow to see how it is done there. But I can only see a menubar entry with now way how to add menus and items to it. Using google also didn't yield anything.

Upvotes: 1

Views: 7236

Answers (1)

BlackDwarf
BlackDwarf

Reputation: 2070

I don't see any way to add a QMenuBar if you don't choose to create an empty QMainWindow, but if you do that, typing text into the "type here" area and pressing enter creates a new QMenu in the menu bar. There is also "type here" areas for each created menu, allowing you to add items (ie QActions) to menus. It worked at least with QtCreator 5.3.1.

Upvotes: 1

Related Questions