qt: fix resource leak when opening a contextual menu
"View" menu parent was unset that led the menu and the associated resources being leaked, notably an observer on the "intf-add" variable which asserted on quit.
update: add code cleanup
Edited by Pierre Lamot