Well, obviously you need to pass a pointer to a QMenuBar, that is what your function expects.
Have you created one?

The easiest way to get a menu bar is to derive from QMainWindow though.

Cheers,
_