Can i disable some menu?

The user can click the debug menu only after the project is loaded and my custom widget is initilaized. So before that, i want to disable the debug menu, can i do that?

[original thread by AlwaysMing]

@ppeiming-mo are you looking into disabling the debug entry in the main-menu? While possible it will not work well for desktop applications which cannot be dynamic as you proposed.