In Qt parent objects are deleteing their children. So if your QMenu object was a child of the QMenuBar, then deleting QMenuBar also deletes QMenu - so then you tried to delete QMenu again so the app crashed.