tags:

views:

74

answers:

1

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?

+1  A: 

Hi,

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

gregseth
Yeah I am asking that in my question (if i'm clear enough). More precisely I was asking if this is a safe thing to do or if it could create errors.
yan bellavance
Just found out that you could also use `QLayout::setMenuBar( QWidget * )`.
gregseth