Disabling a top-level menu (i.e. one that appears in the QMenuBar) doesn't work under MacOS/X (Cocoa or Carbon).
1) Edit $QTDIR/examples/widgets/imageviewer/imageviewer.cpp
2) At line 227 of that file, add this line:
fileMenu->menuAction()->setEnabled(false); // disable the File menu!
3) Compile and run the program
Note that under Linux and Windows, the File menu is disabled, this is the behavior I expected. Under MacOS/X, however, the File menu remains enabled; I think that is a bug.